Your pattern matches; good. May I offer some tips?
Something still looks suspicious to me. Your first pattern match is a choice between [AN]+ and [AN]*(NP)?[AN]*. That second choice can match the null string. Seems odd.if ( $value =~ m/^(?: [AN]+ # Either at least one A|N |[AN]* # or an A|N run (?: NP)? # Possibly interrupted by NP [AN]* ) N$/x ){ # With a terminal N. print "match: $value\n"; }
throop
In reply to Re^2: matching patterns
by throop
in thread matching patterns
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |