in reply to Re^5: String contents
in thread String contents

Yes, you are right. This code works now. But when I was trying to generalize this regex, it failed. Here is the new code:
=~ /^\s*(\w+|\w+ \w+|\w+ \w+ \w+),\s*(\w+|\w+ \w+|\w+ \w+ \w+)(.+?\s*L +LP)$/m;