in reply to Re^3: Fine tuning a reg exp
in thread Fine tuning a reg exp
Would I put this in the my @records bit as a map, or in the foreach (@records) bit? I would like to apply to each record a range of markup tags, but just not sure how I tell Perl to do this. I did try putting the above regexp sub as a map in the my @records bit but it does always work.s/^(([A-Z]+\s[A-Z]+,|[A-Z]+-[A-Z]+,|[A-Z]+\s[A-Z]+\s[A-Z]+,)|([A-Z]+,) +)/\<surname\>$1\<\/surname\>/;
|
|---|