I get:my $x=12345; $x=~s/(?<=\d{2})/\012/g; print $x,"\n";
12 3 4 5I know I can do this other ways, but the result has left me confused as to what is going on with the look behind with the global modifier. Surely at position 3 the look behind 'sees' 12\n? No? Any explanation would be appreciated many thanks james
In reply to Look behind and global by gingaloon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |