- or download this
#!/usr/bin/perl
use strict;
use warnings;
...
say "no match on $string";
}
}
- or download this
(?-xism:foo\d+) when string is "foo17"
(?-xism:bar\S+?) when string is "barABC"
(?-xism:bar\S+?) when string is "nomatch"
- or download this
hashbang, strict, warn, etc...
my $regex1 = qr/foo\d+/;
...
say "no match on $string";
}
}
- or download this
matched part of "foo17" is foo17 when regex is "(?-xism:foo\d+)"
matched part of "barABC" is barA when regex is "(?-xism:bar\S+?)"
no match on this-has-no-match