in reply to Re: Looking for a cleaner regex
in thread Looking for a cleaner regex

Thanks for the info. The is/ste/ thing was a mistake... Can you give the alternative example to (?=$) because I was having trouble without it.

Replies are listed 'Best First'.
Re^3: Looking for a cleaner regex
by hippo (Archbishop) on Dec 08, 2017 at 11:59 UTC

    If I want to find a string ending in foo or bar or baz, I just match against /(foo|bar|baz)$/ rather than repeat the EOL test in the regex. If that doesn't solve it for you perhaps using the techniques described in How to ask better questions using Test::More and sample data will help me and others understand where your problem lies.