http://qs1969.pair.com?node_id=1181553


in reply to Basic Regular expression

You can achieve your desired output by using this re:
$a =~/^(.+)(e|r)?(.*)$/;
Update: Just noticed - this is almost the same as choroba's suggestion.

        ...it is unhealthy to remain near things that are in the process of blowing up.     man page for WARP, by Larry Wall