$ echo "ASDF { tmp plz_match tmp } string2 { tmp } string3 { tmp } " | perl -e' local $/ = "}\n"; while ( <> ) { if ( /^ASDF/ && /plz_match/ ) { print "Matched: $_"; ++$match; } } print "No match\n" unless $match; ' Matched: ASDF { tmp plz_match tmp }
In reply to Re: Matching a string in a parenthesized block (regex help)
by jwkrahn
in thread Matching a string in a parenthesized block (regex help)
by maxamillionk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |