- or download this
The following pattern matches a function foo() which may contain
balanced parentheses as the argument.
...
)
}x;
- or download this
#!/bin/perl -w
use strict;
...
printf "%s\n", m{$re} ? "match" : "nomatch";
/^q/ && exit;
}
- or download this
my $re = qr'^ (
{
...
)*$
)
'x;