Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Walking right into the trap
And of course, when two empty fields are following one eachother my regexp fails doing what I want.$line =~ s/\t([\t\n])/\t\\N$1/g;
The output will be:while (my $line = <DATA>) { $line =~ s/\|(\||$)/\|\\N$1/g; print $line; } __DATA__ a|||d|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regexp: Overlapping matches (?=)
by tye (Sage) on Feb 22, 2008 at 15:32 UTC | |
|
Re: Regexp: Overlapping matches
by hipowls (Curate) on Feb 23, 2008 at 00:24 UTC |