Regular expression validating phone number

by  |  10-Dec-2016 08:54

I’ve worked for startups in the Silicon Valley and Chicago, IL and now work as a consultant building custom applications for clients.

Dim word_query = _ (From word As String In words _ Order By word _ Select word).

What if we need to support (123) 555-1212 and just 555-1212? The key to making password strength validation easy using Regular Expressions is to understand Zero-width positive lookahead assertions (also know as zero-width positive lookaheads). Luckily the concept itself is a lot simpler than the name.

Basically a Zero-width positive lookahead assertion is simply an assertion about a match existing or not.

They are also an incredibly efficient and elegant solution to describing the structure of text and matching those structures.

They are very handy for defining what a string should look like and as such are very good for use in data validation.

Regular Expressions are both complex and elegant at the same time.

Community Discussion