in reply to Secure Regular Expression Check

Just a few of the many recent nodes you may find interesting:

Or, to simplify, as jhourcle says:

[J]ust use placeholders.

HTH,

planetscape