Your regex does match the empty string, which it should not from your descriptions.
My mistake in wording the question. I've updated the post.
I like your alternative suggestion too, but as you already suspected, it is not much simpler anyway.In reply to Re^2: Ideas to improve this regexp?
by rovf
in thread Ideas to improve this regexp?
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |