- or download this
Regex is like ((AND|OR)([!=><]+)(.*))+
Input is like $check = "AND=>1536463OR<foobarOR=5";
- or download this
AND!==!<!>>!!LKJKJIOJJ182873KLJJyuukjljkOR!<><><><><=!Blah
OR==!=!Hmm, could this be right?AND>>>>>>>this could be a problem
- or download this
AND,=>,1536463
OR,<,foobar
OR,=,5
- or download this
$_ = "OR=5AND=>1536463OR<foORobarOR=5 ";
while (m/(AND|OR) #either AND or OR
...
# AND => 1536463
# OR < foORobar
# OR = 5
- or download this
my $opers='=[><=!]?|[><!]=|<>|[<>]';
while (m/(AND|OR)($opers)((?:(?!(?:AND|OR)(?:$opers)).)+)/xgms) {
print "$1 $2 $3\n";
}