Dear Monks
Try as I may, I am failing to achieve enlightenment with regard to the regular expression in this excerpt:
It produces:my $line = "0010+2+O?'Reilly'"; my @fields = ($line =~ /(.*?)[\+']/g); my $i = 0; map { print "[" . $i++ . "]$_\n" } @fields;
but what I want is:[0]0010 [1]2 [2]O? [3]Reilly
[0]0010 [1]2 [2]O'Reilly
Can anybody suggest a change to the second line, and take me further along the path?
Many thanksIn reply to Improved regexp sought by myomancer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |