first
last
should work for more complicated regexps