in reply to Re^2: regex help
in thread regex help

Perhaps then all what you need is (untested):
/(?(DEFINE) (?<sigil> [\$\@%&*]) (?<name_atom> (?: [_A-Za-z][_A-Za-z0-9]* | [0-9]+) ) (?<separator> (?: :: | ')) (?<name> (?: (?&separator)? (?&name_atom) (?:(?&separator) (?&name_atom))*)) (?<punct> \S)) (?&sigil) \s* (?:(?&name) | (?&punct)) /x

Replies are listed 'Best First'.
Re^4: regex help
by choroba (Cardinal) on Apr 21, 2012 at 21:52 UTC
    Unless there is use utf8; somewhere... :-)
      I assume that's on the OPs list of variables he'll avoid. Just like he won't be using ${^POSTMATCH} or any of those special variables...