Loading...

Regex Phone Number - Step by Step

26,562 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Jul 23, 2011

This is the basics of a phone number regex to just help you understand how to write regex in general

VIDEO CORRECTION!! The end of the regex needs to be a $ not a ?

^\+?\d.\s? // +1 or +44
\(?\d{3}\)? // first part
[-.\s]? // possible spacing / sep
\d{3} // 2nd part
[-.\s]? // possible spacing / sep
\d{4}? // 3rd part

Loading...

Advertisement
When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...