You have good answers to your question above. Now, please consider the manner of your asking.
IMO, you're apt to confuse readers -- especially the newcomers whose education is a major goal of the Monastery -- by posting pseudocode without clear indication that that's what it is. And for something this simple, the Monastery's standard is (slightly paraphrased) post a snippet of compilable, executable code (cf: How do I post a question effectively?).
Omitting semi-colons and regex delimiters merely obfuscates; including them (and the other niceties of compilable code) would cost you very little but would provide the community much greater ease of reading.In reply to Re: using just variables in a regular exression
by ww
in thread using just variables in a regular exression
by sdetweil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |