$string = "huckabee AND jfkadlsfj fdsfldfj06329 OR reagan AND biden A +ND clinton OR sebelius OR mccain"; $string =~ s/(^|.+ OR |.+ AND )(.* OR .*)*($| OR .+| AND .+)/$1($2)$3/ +g;
In reply to Building a boolean search engine by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |