Hi monks,
I have a very complex regex that I want to do the back-referencing for the replacement...
$s =~ s/\ ((0?[1-9]|1[0-2])\/(0?[1-9]|[1-2][0-9]|3[0-1])\/(19|20)?[0-9 +][0-9](\s(((0?[0-9]|1[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?)|((0?[0-9 +]|1[0-2]):[0-5][0-9](:[0-5][0-9])?\s(AM|PM))))?)\ /\n$1\n/g;
The result is desirable when I using $1 but not $+...so I would like to ask, what is their different?
Thank you
In reply to Confusion of the effect of $+ and $1 by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |