---
schema_version: "1"
id: 516218eedb8bbc06ea1c1f0e7ec8761e0b298259d069956ab72197a55416faef
title: Escape a Metacharacter
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/dato_data_mapping_formulas_escape_metacharacter.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.dato_data_mapping_formulas_escape_metacharacter.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d99a7b6e05375c2adf5b751e1bab19e8efd42b1d77f905c4ac8965b85383c636
description: To use the literal meaning of a Java RegEx metacharacter in a regular expression, you must cancel the metacharacter, which is called escaping. You can escape a metacharacter in two ways.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# Escape a Metacharacter

To use the literal meaning of a Java RegEx metacharacter in a regular expression, you must cancel the metacharacter, which is called escaping. You can escape a metacharacter in two ways.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d29818e38">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d29818e38 ">To escape special Java characters</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d29818e38 ">Admin</td>

          </tr>
        </tbody>
      </table>

1. Add a double backslash (\\\\) before the metacharacter. In this example, the double backslash is used to escape the ? metacharacter to reference it as a delimiter.
    
    ![escaping method example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-salesforce_datorama-264-0-0-production-enus/d38a342d-dd4a-4af8-8343-f372280a75dd/salesforce_datorama/images/data/java_special_characters.png)
2. Enclose the metacharacter within \\Q and \\E. In this example,\\Q and \\E are used to escape the | metacharacter to reference it as a delimiter.
    
    ![Escaping example 2](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-salesforce_datorama-264-0-0-production-enus/d38a342d-dd4a-4af8-8343-f372280a75dd/salesforce_datorama/images/data/java_special_characters_2.png)
3. These commonly used metacharacters require escaping to be referenced literally in a regex:
    
    ```
    < ( [ { \ ^ - = $ ! | ] } ) ? * + . > _
    ```
4. These functions in Marketing Cloud Intelligence contain delimiters as part of their syntax.
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <tbody><tr class="">
              <td class="slds-cell-wrap">SPLIT(text,delimiter)</td>
              <td class="slds-cell-wrap">Use the SPLIT function where a ‘|’ character is the delimiter:
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>SPLIT([Media_Buy_Name],'\\Q|\\E')</code></pre>
              </td>
            </tr>
            <tr class="">
              <td class="slds-cell-wrap">SELECT(sourceStr,pattern) </td>
              <td class="slds-cell-wrap">Use the SELECT function where a ‘&gt;’ character is the delimiter:
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>SELECT([Media_Buy_Name],'\\&gt;(.*?)E')</code></pre>
              </td>
            </tr>
          </tbody></table>