Re: Regular Expression for the special character "|" pipe

2014-05-27 Thread Mark Lawrence
On 27/05/2014 12:39, Aman Kashyap wrote: On Tuesday, 27 May 2014 16:59:38 UTC+5:30, Daniel wrote: What about skipping the re and try this: 'start=|ID=ter54rt543d|SID=ter54rt543d|end=|'.split('|')[1][3:] On 27.05.2014 14:09, Vlastimil Brom wrote: 2014-05-27 12:59 GMT+02:00 Aman Kashyap :

Re: Regular Expression for the special character "|" pipe

2014-05-27 Thread Roy Smith
In article , Wolfgang Maier wrote: > On 27.05.2014 13:39, Aman Kashyap wrote: > >> On 27.05.2014 14:09, Vlastimil Brom wrote: > >> > >>> you can just escpape the pipe with backlash like any other metacharacter: > >>> > >>> r"start=\|ID=ter54rt543d" > >>> > >>> be sure to use the raw string notat

Re: Regular Expression for the special character "|" pipe

2014-05-27 Thread Wolfgang Maier
On 27.05.2014 13:39, Aman Kashyap wrote: On 27.05.2014 14:09, Vlastimil Brom wrote: you can just escpape the pipe with backlash like any other metacharacter: r"start=\|ID=ter54rt543d" be sure to use the raw string notation r"...", or you can double all backslashes in the string. Thanks

Re: Regular Expression for the special character "|" pipe

2014-05-27 Thread Aman Kashyap
On Tuesday, 27 May 2014 16:59:38 UTC+5:30, Daniel wrote: > What about skipping the re and try this: > > > > 'start=|ID=ter54rt543d|SID=ter54rt543d|end=|'.split('|')[1][3:] > > > > On 27.05.2014 14:09, Vlastimil Brom wrote: > > > 2014-05-27 12:59 GMT+02:00 Aman Kashyap : > > >> I would like

Re: Regular Expression for the special character "|" pipe

2014-05-27 Thread Daniel
What about skipping the re and try this: 'start=|ID=ter54rt543d|SID=ter54rt543d|end=|'.split('|')[1][3:] On 27.05.2014 14:09, Vlastimil Brom wrote: 2014-05-27 12:59 GMT+02:00 Aman Kashyap : I would like to create a regular expression in which i can match the "|" special character too. e.g.

Re: Regular Expression for the special character "|" pipe

2014-05-27 Thread Aman Kashyap
On Tuesday, 27 May 2014 16:39:19 UTC+5:30, Vlastimil Brom wrote: > 2014-05-27 12:59 GMT+02:00 Aman Kashyap : > > > I would like to create a regular expression in which i can match the "|" > > special character too. > > > > > > e.g. > > > > > > start=|ID=ter54rt543d|SID=ter54rt543d|end=| > >

Re: Regular Expression for the special character "|" pipe

2014-05-27 Thread Vlastimil Brom
2014-05-27 12:59 GMT+02:00 Aman Kashyap : > I would like to create a regular expression in which i can match the "|" > special character too. > > e.g. > > start=|ID=ter54rt543d|SID=ter54rt543d|end=| > > I want to only |ID=ter54rt543d| from the above string but i am unable to > write the pattern

Regular Expression for the special character "|" pipe

2014-05-27 Thread Aman Kashyap
I would like to create a regular expression in which i can match the "|" special character too. e.g. start=|ID=ter54rt543d|SID=ter54rt543d|end=| I want to only |ID=ter54rt543d| from the above string but i am unable to write the pattern match containing "|" pipe too. By default python treat "