logo

New Response

« Return to the main article

You are replying to:

    • avatar
    • Jake Howlett
    • Posted on Thu 22 Jun 2006

    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

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: