Help for this page
print 'xxxxaxxxxbxxxx' =~ /a(?>.*?)b/ ? 'match' : 'fail';
$string = 'abcd'; $regex = '^' . join '', map "[^$_]*$_", map quotemeta, split //, $stri +ng; ... if($sequence =~ /$regex/s) { printf "I found a match, at offset %d and with total length %d\n", + $-[1], $+[1]-$-[1]; }