Hi monks,
I want to use the back reference in s///g, but seems I failed with code below:
First I cut the character (non-English) by space, then I join them back if I cut them wrongly (e.g. space between 2 English alphabet). I found the regular expression in line 2 failed - the space is located correctly, but the character before and after were missing and replaced by null (so I see character disappeared) - then I know the back reference here is not working. Did I failed to call the back reference just because of my stupid syntax error?$in =~ s/\s+/\n/g; $in =~ s/[a-zA-Z]\n[a-zA-Z]/$1\ $2/g;
In reply to Back reference in s///g ? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |