Re: [Tutor] problem in replacing regex

2009-04-09 Thread Kumar
Hey Moos/Denis/Kent, Thanks a lot for your replies and suggestions. Actually the value which I had given was separated by \n\r. I now realized that this cannot be done with one regular expression as there is one limit in negative look behind that it requires fixed width. I guess This limit is the

Re: [Tutor] problem in replacing regex

2009-04-08 Thread Moos Heintzen
Hi, You can do the substitution in many ways. You can first search for bare account numbers and substitute them with urls. Then substitute urls into tags. To substitute account numbers that aren't in urls, you simply substitutes account numbers if they don't start with a "/", as you have been t

Re: [Tutor] problem in replacing regex

2009-04-08 Thread Kumar
Hello Denis/Kent, Sorry if I created any confusion. Here is my value: myString = """ https://hello.com/accid/12345-12 /12345-12 http://sadfsdf.com/12345-12 http://sadfsdf.com/asdf/asdf/asdf/12345-12 12345-12 """ so above statements are the value of myString (one string only). I couldn't try den

Re: [Tutor] problem in replacing regex

2009-04-08 Thread Kent Johnson
> Kumar 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 al

Re: [Tutor] problem in replacing regex

2009-04-08 Thread spir
Le Wed, 8 Apr 2009 12:31:31 +0530, Kumar 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

Re: [Tutor] problem in replacing regex

2009-04-07 Thread spir
[forwarded to list] Le Tue, 7 Apr 2009 12:23:33 +0530, Kumar s'exprima ainsi: > Hi denis, > > Thanks a lot for the reply. > > Actually on our web application when we display the data, at that time we do > parsing and make hyperlinks (through ) wherever possible. so if there is > any url like (

Re: [Tutor] problem in replacing regex

2009-04-06 Thread spir
Le Mon, 6 Apr 2009 19:53:25 +0530, Kumar s'exprima ainsi: > Hello everyone, > > I have one account number. I want to replace all this account numbers and > convert them as URLS. > > but I don't want to convert existing urls which has account numbers. [...] I'm not sure of what you expect, wha

[Tutor] problem in replacing regex

2009-04-06 Thread Kumar
Hello everyone, I have one account number. I want to replace all this account numbers and convert them as URLS. but I don't want to convert existing urls which has account numbers. e.g. 1234-4578 first i convert any existing url into and then I check that if any above number exist then I conver