I think the OPs logic is clear; he just mixed up his operator. (His implementation may also be flawed!)
In reply to Re^3: Matching text in a string
by BrowserUk
in thread Matching text in a string
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |