I'm trying to reduce everything in the else to a single regexp ...
This probably isn't the best idea, especially since you yourself say that you're not great with regexen. It may be easier to break things into seperate chunks and parse the chunks with seperate regexen. It'll probably also lead to a bit clearer program since you're not cramming everything into one magic expression.
If you do do one humongous regex, make sure to use the /x modifier and comment it so you'll understand it when you look at it 4.73 months from now.
In reply to Meta aside
by Fletch
in thread Help needed with reducing function to a single regex
by cyberconte
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |