Is it possible to generate strings that match a regular expression string?
javascript, jquery, php, regex
Solution
No. That sort of feature is not available.
You can try to implement it yourself, but I don't think that's the solution for you. Simply write the messages normally. Not everything must always be dynamic.
I like your way of thinking though.
Problem
Is it possible to display the strings that match a regular expression? Example: Take the expression `/^AD\d{3}/` and display `AD999` What I'm doing is validating a string that is pretty simple either containing all numbers, a few characters maybe, and maybe a '-'. I am validating a postal code on form submit against a database of all countries that use a postal code. I could perform it in Javascript or PHP, if that makes any difference.