Log In

Log In



Not registered yet?


Reset password Activation link

Forums ~ FAQ's

How to use Regular Expressions in QuintaDB

April 12, 2011
Completed
0
 

Igor Petrushenko
April 12, 2011

In QuintaDB you can use Regular Expressions as an advanced validation option for text fields.


Go to the Fields menu. Open text field for editing. Find the link Additional options under the Validation section and click on it.
Insert Regular Expression in the field Format.


Regular Expressions


You can use this validation for mobile number checking.
Example:

/^[ 1 ]\d{6,15}$/ – USA phone number format. Starts with the 1 then from 6 to 15 digit.

/^([ 2 ][ 1 ][ 2 ]|[ 3 ][ 1 ][ 5 ]|[ 3 ][ 4 ][ 7 ]|[ 5 ][ 1 ][ 6 ]|[ 5 ][ 8 ][ 5 ]|[ 6 ][ 0 ][ 7 ]|[ 6 ][ 3 ][ 1 ]|[ 6 ][ 4 ][ 6 ]|[ 7 ][ 1 ][ 6 ]|[ 7 ][ 1 ][ 8 ]|[ 8 ][ 4 ][ 5 ]|[ 9 ][ 1 ][ 4 ]|[ 9 ][ 1 ][ 7 ])\d{7}$/ – NY phone codes.

/^([ 0 ][ 8 ][ 0 ][ 0 ]|[ 8 ][ 0 ][ 0 ])\d{7}$/ – For free 800 or 0800 numbers.

/^([+][ 3 ][ 3 ]|[ 3 ][ 3 ])\d{8,9}$/ – For France numbers, format +33 or 33 and from 8 to 9 digits

Regular Expressions in MyTaskHelper.png
Share the discussion in the social networks: