Help for this page

Select Code to Download


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