RegEx appears to not format phone number as expected

Issue #8 new
Former user created an issue

Hello,

I installed this plugin to format a user's phone number properly; whether that is 7, 10, or with an extension. I am using the recommended regex from here: http://phoneregex.com/

I don't receive a regex error when keying in values. However, upon saving any format of a phone number, the value isn't formatted on the jira issue. I tried manually refreshing the page after the regular page refresh on save and still no formatting applied.

I attached pictures of what is happening. Are my expectations of the function and output not matching the features this plugin is meant to provide? Assistance would be appreciated.

The following code is what I have input on the Unique Regex Custom Field:

^(?:(?:\+?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})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$

Comments (1)

  1. Log in to comment