RegEx reference for AI agents

<body>
<p id="docs-hc-snippet" style="display: none;">List of RegEx values in alphabetical order.</p>
<div class="article-banners">
<div id="docs-wmp-link">
<a href="https://support.zendesk.com/hc/en-us/articles/5411234991258-plan" rel="noopener" target="_blank">What's my plan?</a>
</div>
<div class="article-banner" id="suite_all">
<table>
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Team, Growth, Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>
<div class="article-banner" id="support_all">
<table>
<tbody>
<tr>
<td>
<strong>Support</strong>
</td>
<td>Team, Professional, or Enterprise</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="body">

<p class="p">List of RegEx values in alphabetical order.</p>
<div class="p">
<div class="tablenoborder">
<table border="1" cellpadding="4" cellspacing="0" class="table" frame="border" id="topic_qjl_5dh_n2c__table_qfh_c2h_n2c" rules="all" summary="">
<caption><span class="tablecap"><span class="table--title-label">Table 1. </span></span></caption>
<colgroup>
<col style="width:33.33333333333333%">
<col style="width:33.33333333333333%">
<col style="width:33.33333333333333%">
</colgroup>
<thead class="thead" style="text-align:left;">
<tr class="row">
<th class="entry cellrowborder" id="d88e55" style="vertical-align:top;">Value</th>
<th class="entry cellrowborder" id="d88e58" style="vertical-align:top;">Description</th>
<th class="entry cellrowborder" id="d88e61" style="vertical-align:top;">Format</th>
</tr>
</thead>
<tbody class="tbody">
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">Affirmative</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">Customer enters anything starting with y or Y, five letters to show
affirmation</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;">
<p class="p">
<code class="ph codeph">^[yY].{1,5}\b</code>
</p>
</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">credit_card</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">Preset in dashboard</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;"> </td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">CVV</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">CVV number</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;">
<p class="p">
<code class="ph codeph">(CVV|CVV\s)\d{3}</code>
</p>
</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">DOB 1</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">Date of birth formatted as YYYY-MM-DD, YYYYMMDD</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;">
<p class="p">
<code class="ph codeph">^\d{4}[.|-|\/]\d{2}[.|-|\/]\d{2}|^\d{8}</code>
</p>
</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">DOB 2</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">Date of birth formatted as DD/MM/YYYY</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;">
<p class="p">
<code class="ph codeph">\d{1,2}[.|\-|\/]\d{1,2}[.|\-|\/]\d{2,4}\b</code>
</p>
</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">email</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">Preset in dashboard</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;"> </td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">IBAN</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">Preset in dashboard</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;"> </td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">mobileNumber</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">Mobile number, with or without prefix</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;">
<p class="p">
<code class="ph codeph">^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}([-\s.]?[0-9]){4,10}$</code>
</p>
</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">Negative</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">Customer enters anything starting with n or N, five letters to show
negation</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;">
<p class="p">
<code class="ph codeph">^[nN].{1,5}\b</code>
</p>
</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">orderNumber</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">8 or 16 digits, can include letters or numbers or both</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;">
<p class="p">
<code class="ph codeph">[0-9a-zA-Z]{8}|[0-9a-zA-Z]{16}</code>
</p>
</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">PIN</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">Four digits, numbers only</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;">
<p class="p">
<code class="ph codeph">(\s{1})?\d{4}</code>
</p>
</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">phoneNumber</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">Phone number, for example US, CA such as +1 NXX-NXX-XXXX or 01 NXX-NXX-XXXX or
001 NXX-NXX-XXXX</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;">
<p class="p">
<code class="ph codeph">(\d{0,3})?[ ()]?(?:[- ()]?\d[- ()]?){7}</code>
</p>
</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">URL</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">Universal URL regEx</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;">
<p class="p">
<code class="ph codeph">((http|https)://)?[a-zA-Z0-9./?:-=#]+.([a-zA-Z]){2,6}([a-zA-Z0-9.&amp;/?:-=#])*</code>
</p>
</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" headers="d88e55" style="vertical-align:top;">ZIP code</td>
<td class="entry cellrowborder" headers="d88e58" style="vertical-align:top;">Zip code, for example Canada, such as A2B 3C4</td>
<td class="entry cellrowborder" headers="d88e61" style="vertical-align:top;">
<p class="p">
<code class="ph codeph">(\d{5}([ -]\d{4})?|[A-Z]\d[A-Z][ -]?\d[A-Z]\d)</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script id="docs-schema-markup" type="application/ld+json">{
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://support.zendesk.com/hc/en-us/articles/8357756811162",
"url": "https://support.zendesk.com/hc/en-us/articles/8357756811162",
"headline": "RegEx reference for AI agents",
"description": "You can use predefined regular expressions to identify and validate various data formats such as dates, phone numbers, and order numbers in AI agent interactions.",
"articleSection": "Customizing AI agents",
"datePublished": "2024-11-11T22:25:10+00:00",
"dateModified": "2026-05-12T17:43:28.356278+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/8357756811162"
},
"author": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"publisher": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"isPartOf": {
"@type": "WebSite",
"name": "Zendesk Help",
"@id": "https://support.zendesk.com/hc/"
},
"about": {
"@type": "SoftwareApplication",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
}
}</script>
</body>