> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/configuration-client/site-management/personal-data-fields/creating-a-new-personal-data-field/regular-expression-settings.md).

# Regular Expression Settings

### Introduction

Regular expressions can be used to define what data is valid and may be entered in a Personal Data Field. For example, a regular expression can be used to ensure Employee IDs always contain two letters followed by up to six digits.

### Procedure

Checking the **Use Regular Expression** checkbox (on the **Type** tab of Personal Data Field properties), enables all the fields in that section.

Configure as appropriate:

**Note:** Refer to [Common Regular Expressions](https://help.security.gallagher.com/knowledge-hub/configuration-client/site-management/personal-data-fields/creating-a-new-personal-data-field/common-regular-expressions.md) for a list of example regular expressions.

<table><thead><tr><th width="150">Field</th><th>Description</th></tr></thead><tbody><tr><td>Syntax</td><td>This field allows a regular expression syntax, of up to 2048 characters, which is used to validate cardholder PDF data. It allows multiple lines and carriage returns.</td></tr><tr><td>Description</td><td>This field allows up to 2048 characters to describe regular expression syntax. It allows multiple lines and carriage returns.<br><br><strong>Note:</strong> This is the message which will be displayed to an operator if the value entered cannot be saved because it doesn't meet the regular expression validation.</td></tr><tr><td>Test string</td><td>This field allows a sample string, of up to 2048 characters, which helps technicians to write/test regular expression syntax.<br><br><strong>Note:</strong> This field is not saved into the Command Centre database.</td></tr><tr><td><strong>Validate</strong> button</td><td><p>This button validates the test string against the regular expression syntax when clicked. The returned messages could be one of the following:</p><ul><li><em>"The Syntax field cannot be empty.",</em></li><li><em>"The Test String field cannot be empty.",</em></li><li><em>"Validation succeeded.",</em> or</li><li><em>"Validation failed as the value does not match the regular expression."</em></li></ul></td></tr></tbody></table>

**Note:** "Mobile" and "Email" type PDFs have an additional Default Notifications checkbox on this tab. If checked, this provides a default value for cardholder contacts.

![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-9aceeff5775f25d89634566a966be1ff5aececfd%2Fpdftype_regularexpressions.png?alt=media)

When the **Use Regular Expression** checkbox is checked:

* The **Syntax** field must not be empty.
* If the **Default Value** field is not empty, its value must meet the regular expression syntax.
* For an existing PDF, if the **Syntax** field is modified and this PDF is being used by one or more Access Groups, the system will validate all related cardholder PDF data against the new regular expression syntax. If validation fails, an error message box pops up saying:

  *"Cardholder has one or more invalid PDF data values."*
* The regular expression cannot be saved until all existing data is validated against this expression.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.security.gallagher.com/knowledge-hub/configuration-client/site-management/personal-data-fields/creating-a-new-personal-data-field/regular-expression-settings.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
