in reply to regex match triggers "Use of unititialized value ..." warning
$1 and $2 are both defined when the match occurs.
That can't be as there is only one set of capturing parens. The second set of parens are a non-capturing lookahead.
This would probably do what you are trying to achieve:
s/(?<=\d),(?=\d)/|/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex match triggers "Use of unititialized value ..." warning
by mikeraz (Friar) on Feb 22, 2011 at 13:00 UTC |