Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

RegEx Question

I'm using this RegEx in my script to test if a phone number field actually contains a valid phone number:

^(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?:\-?|\ ?))[2-9]\d{2}[- ]?\d{4}$

This works fine. But it turns out that my source data sometimes has extensions tacked on to the end of the phone number in the form of an underscore and three or four digits:  _123 or _1234

Any RegEx experts out there who know how to add these optional extensions to my RegEx?

0 Replies