$re = '/(you (?<action>fire|poach|snipe) an?|your) (?<prefix>[^\.!]*? )?(?<ammo>arrow|bolt|stone shard|shard|rock|sphere|clump|coral|fist|holder|lump|patella|pellet|pulzone|quadrello|quarrel|quill|stone|stopper|verretto|blowgun dart|crumb|spine|mantrap spike|tiny dragon|icicle|fang|scale|grey-black spike|bacon strip|page|naga|thorn|fragment)s?(?<suffix> [^\.!]*?)?? (at|passes through)/im';
$str = 'Your Sunderstone shard passes through the revenant conscript with no effect and falls to your feet!
< You fire a blunt-tipped arrow with camel stripes at a quartz gargoyle. A quartz gargoyle evades, just stepping out of harm\'s way.
The blunt-tipped arrow hits a wall and falls to your feet!
[You\'re solidly balanced with no advantage.]
< You fire a blunt-tipped arrow with absinthe-green stripes at an Endrus serpent. An Endrus serpent dodges, ducking in the nick of time.
The blunt-tipped arrow lands nearby!
[You\'re adeptly balanced and in better position.]
< You fire a senci stone shard at an Endrus serpent. An Endrus serpent evades, barely twisting out of harm\'s reach.
The stone shard lands nearby!
[You\'re nimbly balanced and in dominating position.]
[Roundtime 1 sec.]
< You fire a boar-tusk arrow at an Endrus serpent. An Endrus serpent evades, ducking in the nick of time.
The boar-tusk arrow lands nearby!
[You\'re adeptly balanced and overwhelming opponent.]
[Roundtime 1 sec.]
< Moving with the precision of a mongoose, you snipe a blunt-tipped arrows with absinthe-green stripe at a quartz gargoyle. A quartz gargoyle attempts to evade, avoiding only some of the blow.
The arrow lands a massive strike (11/23) that etches a light cut into the right side of the chest.
The blunt-tipped arrow falls to the ground!
[You\'re nimbly balanced and in good position.]
< Driving in with an overwhelming assault, you poach an ice-adder arrow at a granite gargoyle. A granite gargoyle fails to evade, twisting partially away from much of the blow.
The arrow lands a massive strike (11/23) that nicks the gargoyle\'s left forearm.
The ice-adder arrow lodges itself shallowly into the granite gargoyle!
[You\'re solidly balanced with no advantage.]
[Roundtime 1 sec.]
< Moving with indomitable grace, you fire a blunt-tipped bolts with lavender chevron at a copperhead viper. A copperhead viper fails to evade, mis-stepping and blundering into the blow.
The bolt lands a powerful strike (10/22) that bloodies the viper\'s lip, lightly stunning it.
The blunt-tipped bolt falls to the ground!
[You\'re bruised, nimbly balanced and in dominating position.]
[Roundtime 1 sec.]
< Driving in with exacting precision, you fire a pretty pink tiny dragon with a spiked tail at a ship\'s rat. A ship\'s rat attempts to dodge, leaning wrong and blundering into the blow.
The tiny dragon lands a cataclysmic strike (22/23) (Did the Greater Fist just erupt again?) that painfully mashes the left leg.
< Driving in with exacting precision, you fire a bacon strip at a ship\'s rat. A ship\'s rat attempts to dodge, leaning wrong and blundering into the blow.
The tiny dragon lands a cataclysmic strike (22/23) (Did the Greater Fist just erupt again?) that painfully mashes the left leg.
< You fire a matte indurium sphere at an arthelun cabalist. An arthelun cabalist dodges, leaning to one side with no room to spare.
The matte indurium sphere hits a wall and falls to your feet!
[You\'re winded, mighty, nimbly balanced and in better position.]
[Roundtime 1 sec.]
< Moving with amazing force and guile, you fire a Sunderstone shard at a storm bull. A storm bull attempts to dodge, taking the full blow. The shard lands a spine-rattling strike that rips the right arm clean off at the shoulder.
The Sunderstone shard falls to the ground!
A storm bull expires with a bellow and a crackle of electricity.
The shimmering ethereal shield fades from around a storm bull.
[You\'re nimbly balanced]
< Moving with amazing force and guile, you fire a delicious cupcake crumb decorated with sprinkles at a storm bull. A storm bull attempts to dodge, taking the full blow. The crumb lands a spine-rattling strike that rips the right arm clean off at the shoulder.
The cupcake crumb falls to the ground!
A storm bull expires with a bellow and a crackle of electricity.
The shimmering ethereal shield fades from around a storm bull.
[You\'re nimbly balanced]
Your attempt is slightly hindered by your demonscale shield.
< You fire a lemon-striped arrow at a giant bear. A giant bear dodges, ducking in the nick of time.
The lemon-striped arrow falls to your feet!
[You\'re nimbly balanced and have slight advantage.]
Your attempt is slightly hindered by your demonscale shield.
< Moving with dominating grace, you fire a lemon-striped arrow at a giant bear. A giant bear attempts to dodge, avoiding only some of the blow.
The arrow lands an extremely heavy hit (9/22) that deeply bruises the right bicep, lightly stunning it.
The lemon-striped arrow falls to the ground!
[You\'re nimbly balanced and in good position.]
[Roundtime 1 sec.]';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php