Participants Database
[resolved] Regex Matches (5 posts)

  1. rwilki
    Posted 3 years ago #

    Love your particpants database plugin but I can't get regex matches to work. I've tried a million expressions and they're just not working.

    looking for us phone number exp. preferably mandating format like this: xxx-xxx-xxxx

    and us zip code with or without -xxxx



  2. rwilki
    Posted 3 years ago #

    Never mind, I figured it out...

    ^(\d{3}-\d{3}-\d{4})*$ <!-- phone -->
    ^\d{5}(-\d{4})?$ <!-- zip -->

    Great plugin...

  3. xnau webdesign
    Plugin Author

    Posted 3 years ago #


    Regexes can be tricky, I know. It's important to remember that the statement must include delimiters to work, that's the most common mistake. You could try something like this for your phone number:


    to strictly force your format. Be sure to tell your users what you're expecting, the help field is good for that. The delimiter, if you don't know, is the first and last character of the regex and should be something that is not in the regex statement itself, as in the example above.

    Your second example is slightly more tricky...you could try:


    for that.

  4. rwilki
    Posted 3 years ago #

    I figured it out if you look above. I didn't include the "#" in the examples, but I think that was the difference maker.

    Thanks again!

  5. xnau webdesign
    Plugin Author

    Posted 3 years ago #

    Glad you got it sorted.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Participants Database
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic