pysome has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
pls help me check this issues: E.g:
But on the contrary,I wanna get a "left-to-right" substitution.That is ,i want to get "12-34-56-78-9"
I try :
Pysome
pls help me check this issues: E.g:
It produce "1-23-45-67-89" ,it is OK.$d = "123456789"; $d =~ s/(?<=\d)(?=(\d\d)+$)/-/g; print "$d";
But on the contrary,I wanna get a "left-to-right" substitution.That is ,i want to get "12-34-56-78-9"
I try :
It can't work.Where does it wrong? The wrong log:$d =~ s/(?<=^(\d\d)+)(?=\d)/-/g;
TIA.Variable length lookbehind not implemented in regex; marked by <-- HER +E in m/(?<=^(\d\d)+)(?=\d) <-- HERE / at Noname1.pl line 4.
Pysome
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Another puzzled RegEx Problem.
by ikegami (Patriarch) on Sep 12, 2007 at 13:29 UTC | |
Re: Another puzzled RegEx Problem.
by Fletch (Bishop) on Sep 12, 2007 at 13:32 UTC | |
Re: Another puzzled RegEx Problem.
by Prof Vince (Friar) on Sep 12, 2007 at 16:53 UTC | |
by pysome (Scribe) on Sep 13, 2007 at 00:59 UTC | |
Re: Another puzzled RegEx Problem.
by shmem (Chancellor) on Sep 12, 2007 at 13:33 UTC | |
Re: Another puzzled RegEx Problem.
by johnlawrence (Monk) on Sep 12, 2007 at 13:59 UTC | |
Re: Another puzzled RegEx Problem.
by artist (Parson) on Sep 12, 2007 at 15:11 UTC | |
by ikegami (Patriarch) on Sep 12, 2007 at 17:12 UTC | |
by pysome (Scribe) on Sep 13, 2007 at 01:11 UTC |
Back to
Seekers of Perl Wisdom