-jackdiedmy @out = split(/\s+(AND|OR)\s+/i, $string); for (my $i = 0; $i < scalar(@out); $i += 2) { $out[$i] = 'tools.description LIKE "%' . $out[$i] . '%"'; #NB, you w +ant to quote $out[$i] appropriately for your database to avoid arbitr +ary user SQL uc($out[$i+1]); } print join(' ', @out);
In reply to Re: Regex switching problem
by jackdied
in thread Regex switching problem
by cfreak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |