I don't quite understand your requirements. Possibly this is because English is not my native language, but I fear it is unclear even to the native speakers.
My impression is, that you haven't yet thought it completely through yourself.
I recommend the teddy bear approach, that is, try to explain to a random person, who should not be an expert, what it is you want to do and how you think it should be done.
Update 2015-07-02: I just learnt that the "official" name of this technique is rubber duck debugging.In reply to Re: How to write regex for special characters without using back slashes??
by soonix
in thread How to write regex for special characters without using back slashes??
by sumathigokul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |