Perl regular expressions allow for look-ahead and look-behind
assertions in both the positive and negative sense. However,
look-behind assertions are a bit annoying, because they cannot
be patterns of non-constant length. Meaning you can't say
print "whatever" if "foobar" =~ /(?<=o*)b/;
# print whatever if foobar has a b preceeded by any number of o's
You'll have to work around it somehow.