> 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-installation/card-types/setting-up-card-types/sample-regular-expressions.md).

# Sample Regular Expressions

The following table shows some sample regular expression syntaxes that may be configured as the syntax strings for a Card Type of the Text Card Number Format:

| Pattern                                  | Sample Card Numbers                                                                                                            | Description                                                                                                                                                                                            |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| (empty)                                  |                                                                                                                                | <p>The syntax string is unspecified.<br>Effectively the same as <code>^.\*$</code> (any characters).</p>                                                                                               |
| `^[A-Z]{2}[0-9]{4}$`                     | AB1234                                                                                                                         | Vehicle number plate with 2 English upper case letters plus 4 decimal digits, (e.g. the old ‘normal’ New Zealand vehicle plate number).                                                                |
| `^[A-Z]{3}[0-9]{3}$`                     | ABC123                                                                                                                         | Vehicle number plate with 3 English upper case letters plus 3 decimal digits, (e.g. the new ‘normal’ New Zealand vehicle plate number).                                                                |
| `^([A-Z]{2}[0-9]{4}\|[A-Z]{3}[0-9]{3})$` | <p>AB1234<br>ABC123</p>                                                                                                        | The combination of the above two.                                                                                                                                                                      |
| `^[A-Z0-9]{1,6}$`                        | <p>A<br>0<br>A1<br>1A<br>A1A<br>1A1<br>A12B<br>1ABC2<br>A12345<br>AB1234<br>ABC123<br>ABCDEF<br>123456<br>123ABC<br>12ABCD</p> | <ul><li>Vehicle number plate with 1 to 6 alpha-numeric characters.</li><li>English letters and decimal numbers can appear anywhere in the string.</li><li>English letters are in upper case.</li></ul> |

Below are some of the best practice suggestions for configuring a regular expression syntax string:

* Always specify the start of the string, (i.e. ‘^’) and the end of the string, (i.e. ‘$’).
* For alph-anumeric Automatic Number Plate Recognition (ANPR) purpose, use either upper cases or lower case, not both at the same time.


---

# 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-installation/card-types/setting-up-card-types/sample-regular-expressions.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.
