This is why I said "Have you verified that your text contains what you think it does?".
Print it out and see!
In the code you give above, for example, you're testing against $test - but getting the input into $test_name - which isn't being used!
In reply to Re: Regular Expression Problem
by skx
in thread Regular Expression Problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |