Re: Python re expr from Perl to Python

2007-01-07 Thread Thomas Ploch
Florian Diesch schrieb: > "Michael M." <[EMAIL PROTECTED]> wrote: > >> In Perl, it was: >> >> >> ## Example: "Abc | def | ghi | jkl" >> ## -> "Abc ghi jkl" >> ## Take only the text betewwn the 2nd pipe (=cut the text in the 1st >> pipe). >> $na =~ s/\ \|(.*?)\ \|(.*?)\ \|/$2/g; >> >>

Re: Python re expr from Perl to Python

2007-01-07 Thread Florian Diesch
"Michael M." <[EMAIL PROTECTED]> wrote: > In Perl, it was: > > > ## Example: "Abc | def | ghi | jkl" > ## -> "Abc ghi jkl" > ## Take only the text betewwn the 2nd pipe (=cut the text in the 1st > pipe). > $na =~ s/\ \|(.*?)\ \|(.*?)\ \|/$2/g; > > ## -- remove [ and ] in text > $n

Re: Python re expr from Perl to Python

2007-01-06 Thread Paddy
Paddy wrote: > Michael M. wrote: > > > In Perl, it was: > > > > > >## Example: "Abc | def | ghi | jkl" > >## -> "Abc ghi jkl" > >## Take only the text betewwn the 2nd pipe (=cut the text in the 1st > > pipe). > >$na =~ s/\ \|(.*?)\ \|(.*?)\ \|/$2/g; > > > >## -- remove [

Re: Python re expr from Perl to Python

2007-01-06 Thread Paddy
Michael M. wrote: > In Perl, it was: > > >## Example: "Abc | def | ghi | jkl" >## -> "Abc ghi jkl" >## Take only the text betewwn the 2nd pipe (=cut the text in the 1st > pipe). >$na =~ s/\ \|(.*?)\ \|(.*?)\ \|/$2/g; > >## -- remove [ and ] in text >$na =~ s/\[//g; >

Re: Python re expr from Perl to Python

2007-01-06 Thread Carsten Haese
On Sat, 2007-01-06 at 15:43 +0100, Michael M. wrote: > In Perl, it was: > > >## Example: "Abc | def | ghi | jkl" >## -> "Abc ghi jkl" >## Take only the text betewwn the 2nd pipe (=cut the text in the 1st > pipe). >$na =~ s/\ \|(.*?)\ \|(.*?)\ \|/$2/g; > >## -- remove [

Re: Python re expr from Perl to Python

2007-01-06 Thread Jorge Godoy
"Michael M." <[EMAIL PROTECTED]> writes: > In Perl, it was: > > > ## Example: "Abc | def | ghi | jkl" > ## -> "Abc ghi jkl" > ## Take only the text betewwn the 2nd pipe (=cut the text in the 1st pipe). > $na =~ s/\ \|(.*?)\ \|(.*?)\ \|/$2/g; > > ## -- remove [ and ] in text > $na

Python re expr from Perl to Python

2007-01-06 Thread Michael M.
In Perl, it was: ## Example: "Abc | def | ghi | jkl" ## -> "Abc ghi jkl" ## Take only the text betewwn the 2nd pipe (=cut the text in the 1st pipe). $na =~ s/\ \|(.*?)\ \|(.*?)\ \|/$2/g; ## -- remove [ and ] in text $na =~ s/\[//g; $na =~ s/\]//g; # print "DEB: \"