But that assumes there are no leading or trailing vertical bars. Or you can use lookahead:join "|" => map {length () ? $_ : '\N'} split /[|]/ => $line, -1;
$line =~ s'[|](?=[|])'|\N'g;
Abigail
In reply to Re: Broken regexp
by Abigail-II
in thread Broken regexp
by ColtsFoot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |