http://qs321.pair.com?node_id=726767


in reply to Re: One regex construct to handle multiple string types
in thread One regex construct to handle multiple string types

/(.*\.)?(\S+)/

has a needless capture

/(?:.*\.)?(\S+)/

And the .* is useless (OP didn't specify he wanted last possible match)

/\.?(\S+)/