Skip to main content
All CollectionsSetting up templates in editable products
Format Control (Regular Expressions Guide)
Format Control (Regular Expressions Guide)
Max Kulow avatar
Written by Max Kulow
Updated over 7 years ago

Posted by Bruno on

20 June 2016

| Featured

How do I use format controls? I want to make sure people write the telephone number correctly.

Image 096

The PJ system uses Regular Expressions for format control rules. To find them in your system click here.

~~~~~~~~~~~

The PJ System offers some starter regexps, but you can create more, by creating a format. To find or build regexps click on one of the following links:

~~~~~~~~~~~

Video: Using Format Control

Here are some examples:

#\+?\d{0,3}?[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}?#

Allows any of the following:

+1 333 333 3333
+44 333.333.3333
44 333-333-3333
+345 (333) 333.3333
333.333.3333
333-333-3333
(333) 333.3333

~~~~~~~~~~~~~~~~~

#\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}?#

Allows any of the following:

333 333 3333
333.333.3333
333-333-3333
(333) 333.3333

~~~~~~~~~~~~~~~~~

#\+\d{0,3}\s\(0\)\s\d{4}\s\d{6}#

Allows any of the following:

+123 (0) 1234 567890
+11 (0) 1234 567890
+1 (0) 1234 567890

~~~~~~~~~~~~~~~~~

#\+44\s\(0\)\s\d{4}\s\d{6}#

Allows only the following:

+44 (0) 1234 567890

~~~~~~~~~~~

For more help please email support@printjob.com

Comments are closed.

Did this answer your question?