Skip to main content
Skip table of contents

Popular Formats

Here is the list of popular formats that you can design using regular expressions.

Format

Character Limit

Field Width

Regular Expressions

Examples

DATE

Between 0 and 10, this will allow for 10 (0-9) symbols to be entered (2 for month, 2 for day, and 4 for year. You will notice that it only adds up to 8 digits, the extra 2 is for the forward slashes that separate the month, day, and year).

10 characters (2 for month, 2 for day, 4 for year, and 2 for the forward slashes).

\d{2}\/\d{2}\/\d{4}

\d{2} and \d{4} refers to the sequence of two and 4 digits respectively (numbers 0 to 9). \/ stands for forward slash, \ is used to interpret / as a forward slash.

More precise:
(0[1-9]|1[0-2])\/
(3[01]|[12]\d|0[1-9])\/
(1[89]\d{2}|2[01]\d{2})

mm/dd/yyyy
\d{2}\/\d{2}\/\d{4}

Phone Number

Between 0 and 12, this will allow for 12 symbols to be entered.

12 characters (3 for area code, 3 for prefix, 4 for line number).

\d{3}-\d{3}-\d{4}

\d{3} and \d{4} refers to the sequence of three and four digits respectively (numbers 0 to 9), - stands for a dash.
More precise:
 \(?\s*\d{3}\s*\)?(\s|-)*\d{3}(\s|-)*\d{4}

000-000-0000
\d{3}-\d{3}-\d{4}

Zipcode

Between 0 and 5, this will allow for 5 digits to be entered. (there are 5 digits in a zip code).

5 characters.

\d{5}

\d{5} refers to the sequence of five digits.

02135
\d{5}

To use the Email format, go to the survey Questions page and select the New Question option from the Insert dropdown menu then:

  1. Choose the Single line text with pre-format options question type from the Please select a question type dropdown box.

  2. Input your question text into the Write your question below text box.

  3. Input answer choices using the Write label for each line option.

  4. Select the Format answers option to select from the available formats.

  5. Next to the first answer choice select the Email format.

  6. Now you have a field formatted for a user to enter in an email address.

  7. Make sure that you click the Save button to save your newly created question.

  • As a simple and fast workaround for creating date format we recommend using Calendar plugin. This plugin adds visual calendar for selecting dates to your survey. For more details consult the Pluginshelp chapter.

  • The regular expression itself does not limit the quantity of symbols to be entered. It only creates the format for the certain pattern. To limit the quantity of symbols, use the Character Limit option, shown in the table above.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.