Skip to main content
Solved

Regex Formatting

  • February 7, 2018
  • 3 replies
  • 105 views

Forum|alt.badge.img

I have a Regex validation expression to validate phone numbers.  2 questions:

1.  Can I add the substitution code to format the results? For example Phone number validation ^\\(?([0-9]{3})\\)?[-.●]?([0-9]{3})[-.●]?([0-9]{4})$

want to add replace ($1) $2-$3 to format the validated numbers.

2.  Would the field be text or number?

Best answer by Community Expert

The field would be a text field and the text type under Validation would be Custom not Text or Number. Test your expression out within any Regex library. 

But as far as I can test myself, DocuSign does NOT suppot change and replace within a Regex expression. Let me know if you're able to get it to work.

Hope this helps.

View Original
Is this content helpful?

3 replies

Forum|alt.badge.img

Hi,

Welcome back to the DocuSign Support Community!

If you go to https://regexr.com/, you'll be able to determine what would be best to use. The answer to the 2nd question would be a text field with the validation is numbers.If you have further questions, please let us know. Thank you. 

 

Donna DocuSign Support Community Moderator 


Forum|alt.badge.img

I'm sorry I wasn't clear.  Does DocuSign support replace to change format after passing validation?


Forum|alt.badge.img
  • Docusign Employee
  • 1935 replies
  • Answer
  • February 14, 2018

The field would be a text field and the text type under Validation would be Custom not Text or Number. Test your expression out within any Regex library. 

But as far as I can test myself, DocuSign does NOT suppot change and replace within a Regex expression. Let me know if you're able to get it to work.

Hope this helps.