Title: Regex Validation
Last modified: September 1, 2016

---

# Regex Validation

 *  [timothyk](https://wordpress.org/support/users/timothyk/)
 * (@timothyk)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/regex-validation/)
 * Hi,
 * i’m using your plugin on a website and doing some regex validation on it.
 * Everything works fine, but the phone number validation just doesn’t work.
 * I tested my regex on 3 websites for now and it works, so i’m here.
 * /(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-
   9]‌​)\s*)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)([2-9]
   1[02-9]‌​|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})/
 * is the regex,
 * 514 415-8899
    5144158899
 * are the actual two values that i had problems with.
 * Any ideas ?
 * Thank you,
 * Tim.
 * [https://wordpress.org/plugins/participants-database/](https://wordpress.org/plugins/participants-database/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/regex-validation/#post-7563193)
 * Are you saying those numbers match the regex when you test them on other sites,
   but not in Participants Database?
 * Looking at your regex on [https://regex101.com/](https://regex101.com/) neither
   of the phone numbers match. I couldn’t see why right away, the regex is pretty
   complicated.

Viewing 1 replies (of 1 total)

The topic ‘Regex Validation’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [number](https://wordpress.org/support/topic-tag/number/)
 * [participant](https://wordpress.org/support/topic-tag/participant/)
 * [phone](https://wordpress.org/support/topic-tag/phone/)
 * [regex](https://wordpress.org/support/topic-tag/regex/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * 1 reply
 * 2 participants
 * Last reply from: [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/regex-validation/#post-7563193)
 * Status: not resolved