If you want to use regexes, you could try something like this:
my $op = qr/AND|OR|NOT/; my $block = qr/($op?)\s*\((\w\s+$op\s+\w)\)/; if ($str =~ m/^\(\s*(?:$block\s*)\)/){ # access $1, $2, ... here }
In reply to Re: Regular expreesion for extraction of words
by moritz
in thread Regular expreesion for extraction of words
by Archana
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |