« Return to the main article
Hi Keith. When creating a RegExp from a string you need to "double escape" the \s. So your value passed to the constructor would need to be:
/(\\D{3}\\d{4})$/
Hope that helps. Glad you like the code.
Jake
Hi Keith. When creating a RegExp from a string you need to "double escape" the \s. So your value passed to the constructor would need to be:
/(\\D{3}\\d{4})$/
Hope that helps. Glad you like the code.
Jake