Re: re sub help

2005-11-05 Thread Bengt Richter
On 4 Nov 2005 22:49:03 -0800, [EMAIL PROTECTED] wrote: >hi > >i have a string : >a = >"this\nis\na\nsentence[startdelim]this\nis\nanother[enddelim]this\nis\n" > >inside the string, there are "\n". I don't want to substitute the '\n' >in between >the [startdelim] and [enddelim] to ''. I only want t

Re: re sub help

2005-11-05 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > hi > > i have a string : > a = > "this\nis\na\nsentence[startdelim]this\nis\nanother[enddelim]this\nis\n" > > inside the string, there are "\n". I don't want to substitute the '\n' > in between > the [startdelim] and [enddelim] to ''. I only want to get rid of the > '\n

Re: re sub help

2005-11-05 Thread Mike Meyer
[EMAIL PROTECTED] writes: > i am still interested about using re, i find it useful. am still > learning it's uses. > so i did something like this for a start, trying to get everything in > between [startdelim] and [enddelim] > > a = > "this\nis\na\nsentence[startdelim]this\nis\nanother[enddelim]thi

Re: re sub help

2005-11-05 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote: > i am still interested about using re, i find it useful. am still > learning it's uses. > so i did something like this for a start, trying to get everything in > between [startdelim] and [enddelim] > > a = > "this\nis\na\nsentence[startdelim]this\nis\nanother[enddelim]t

Re: re sub help

2005-11-05 Thread s99999999s2003
thanks for the reply. i am still interested about using re, i find it useful. am still learning it's uses. so i did something like this for a start, trying to get everything in between [startdelim] and [enddelim] a = "this\nis\na\nsentence[startdelim]this\nis\nanother[enddelim]this\nis\n" t = re

Re: re sub help

2005-11-04 Thread Mike Meyer
[EMAIL PROTECTED] writes: > hi > > i have a string : > a = > "this\nis\na\nsentence[startdelim]this\nis\nanother[enddelim]this\nis\n" > > inside the string, there are "\n". I don't want to substitute the '\n' > in between > the [startdelim] and [enddelim] to ''. I only want to get rid of the > '\n

Re: re sub help

2005-11-04 Thread Mike Meyer
[EMAIL PROTECTED] writes: > hi > > i have a string : > a = > "this\nis\na\nsentence[startdelim]this\nis\nanother[enddelim]this\nis\n" > > inside the string, there are "\n". I don't want to substitute the '\n' > in between > the [startdelim] and [enddelim] to ''. I only want to get rid of the > '\n

re sub help

2005-11-04 Thread s99999999s2003
hi i have a string : a = "this\nis\na\nsentence[startdelim]this\nis\nanother[enddelim]this\nis\n" inside the string, there are "\n". I don't want to substitute the '\n' in between the [startdelim] and [enddelim] to ''. I only want to get rid of the '\n' everywhere else. i have read the tutorial