XP is just a number | |
PerlMonks |
Re: Looking for a cleaner regexby Anonymous Monk |
on Dec 13, 2017 at 03:29 UTC ( [id://1205391]=note: print w/replies, xml ) | Need Help?? |
Using the advice I've now simplified: You've still got the same look-behind typos as described in Re: Looking for a cleaner regex Guessing at the meaning the look behinds, the list of words is now
Eliminating the obviously needless look-behinds , leaving the goofy guesses and guessing again
If my new guess is correct the last 4 needless look behinds can be replaced by "s"
And the single character suffix can be replaced by a char class
So there you have it the optimal regex is qr/( .ron | steis | ste | mos | es | ué | [oóíéens] )$/x
In Section
Seekers of Perl Wisdom
|
|