- or download this
"(?=hello)" matches "hello"
".*" matches "hello Ga"
"[^G]" matches "g"
"[^a]" matches "s"
".*" matches nothing
- or download this
( "hello Gags" =~ /^(?=hello)(?!.*Ga/ )&& print ("Matched") || print (
+"Unmatched")
- or download this
use strict;
( "hello Gags" =~ /^(?=hello)(.*)([^G][^a])(.*)$/ ) ? matches() : pri
+nt ("Unmatched");
...
$1 = 'hello Ga'
$2 = 'gs'