Whitout this it is impossible to guess what you are triyng to achieve.
Probably a single regex can do the job you need. Here around are very good regexer (not me).
Do not modify your original post without putting some note on changes: replies can have no sense after the modification of the original post.
L*
In reply to Re^5: Using regex with a variable
by Discipulus
in thread Using regex with a variable
by Praveen Dharmaraj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |