[Tutor] problem in replacing regex

spir denis.spir at free.fr
Wed Apr 8 09:34:24 CEST 2009


Le Wed, 8 Apr 2009 12:31:31 +0530,
Kumar <hihiren1 at gmail.com> s'exprima ainsi:

> Hi Danis,
> 
> Just to be more specific that I can add [^/] in my expression which will
> successfully work for url (i.e. http://sdfs/123-34) but it will also work
> for non url (i.e. /123-34 ) so u am just trying it to make it specific for
> url only
> I have already tried [^(http).*/] but that also failed and it didn't work on
> /123-34

You'd better provide an example of your input, what you expect as output, the relevant part of your prog and what you get as actual output.

Denis

> Thanks,
> Hiren
> 
> On Tue, Apr 7, 2009 at 7:54 PM, Kumar <hihiren1 at gmail.com> wrote:
> 
> > Hi Danis,
> >
> > Your solution would work perfectly fine for one value.

> ?

> > but actually here i dont have one value (either number or url)...
> > e.g.
> > s = "https://hello.com/accid/12345-06450
> >
> > /12345-06450
> >
> > http://sadfsdf.com/12345-12
> > http://sadfsdf.com/asdf/asdf/asdf/12345-12
> > 12345-12"
> >
> > so everything above is one string value and actually that's why I am first
> > doing both operations separately and that is main cause of problem.
> >
> > Thanks,
> > Kumar

------
la vita e estrany


More information about the Tutor mailing list