in reply to pick a word contaning reg-ex

And another option:

use Modern::Perl; while (<DATA>) { say $1 while /(\S+!)/g; } __DATA__ Mary had a little lamb! , whose fleece! was white! as snow. And everywhere! that Mary went, the lamb was sure! to go.

Output:

lamb! fleece! white! everywhere! sure!