You are viewing limited content. For full access, please sign in.

Question

Question

Telephone Number Pattern Matching

asked on February 3, 2014

Afternoon Folks,

 

I need some help with regular expressions with telephone numbers. 


Here is our format  (613)-236-0497

 

Any help is appreciated!

 

0 0

Answer

SELECTED ANSWER
replied on February 3, 2014

The dash is not a special character in regular expressions unless it is within brackets or parenthesis.

 

\(\d\d\d\)-\d\d\d-\d\d\d\d

 

2 0

Replies

replied on February 3, 2014

this is a common one, and is suggested in Laserfiche already. 

 

0 0
replied on February 3, 2014

Yes - but i need the brackets.

0 0
replied on February 3, 2014 Show version history

you mean \(\d\d\d\)\-\d\d\d\-\d\d\d\d  ???

 

Basically, to use any special character of Regular expression explicitly, you need to put a \ in front of it to get it to cancel out it's special meaning. That is why we do this in front of ( ) and -

0 0
SELECTED ANSWER
replied on February 3, 2014

The dash is not a special character in regular expressions unless it is within brackets or parenthesis.

 

\(\d\d\d\)-\d\d\d-\d\d\d\d

 

2 0
replied on February 3, 2014

Thanks Eric,

 

I guess without much experience in that section of the Laserfiche I did not remember about the dash not being a special character unless you are using brackets. 

0 0
replied on February 4, 2014

The Empower presentation by Flavio Kuperman was very helpful in understanding patterns and expressions.  There is PowerPoint on the support website for CC204:  The Power of Patterns in Laserfiche

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.