
<!DOCTYPE html
  PUBLIC "html5" "about:legacy-compat">
<html xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="copyright" content="(C) Copyright 2012"/>
<meta name="DC.rights.owner" content="(C) Copyright 2012"/>
<meta name="DC.Type" content="reference"/>
<meta name="DC.Title" content="Reference Information: Regular Expression Syntax"/>
<meta name="abstract" content="Regular expressions can be used in the Filters workshop and the Search pane, as well as for the DisableMatchingProperties advanced setting. This topic lists the regular expression syntax and abbreviations."/>
<meta name="description" content="Regular expressions can be used in the Filters workshop and the Search pane, as well as for the DisableMatchingProperties advanced setting. This topic lists the regular expression syntax and abbreviations."/>
<meta name="DC.Format" content="XHTML"/>
<meta name="DC.Identifier" content="cps-r-ReferenceInformation-RegularExpressionSyntax"/>
<meta name="DC.Language" content="en"/>
<link rel="stylesheet" type="text/css" href="../DSDocXML.css"/>
<title xmlns:mml="http://www.w3.org/1998/Math/MathML">Reference Information: Regular Expression Syntax</title>
<script xmlns:mml="http://www.w3.org/1998/Math/MathML" type="text/javascript" src="../DSDocHighlight.js">
  	/* */
  	</script></head>
<body onLoad="highlightSearchTerms();" id="cps-r-ReferenceInformation-RegularExpressionSyntax">
<a xmlns:mml="http://www.w3.org/1998/Math/MathML" name="hj-top"> </a><table xmlns:mml="http://www.w3.org/1998/Math/MathML" class="table1" id="table11"><tr><td><table class="DocHeader"><tr><td class="DocHeader1" colspan="2"><h1>Reference Information: Regular Expression Syntax</h1></td></tr><tr><td class="DocHeader4" colspan="2"/></tr><tr><td class="DocHeader3" colspan="2"><table class="DocThemeIntro" id="table12"><tr><td class="Intro1Only"><p class="header"><p class="abstract"><span class="shortdesc">Regular expressions can be used in the Filters workshop and the Search pane, as well as for the <span class="ph uicontrol">DisableMatchingProperties</span> advanced setting. This topic lists the regular expression syntax and abbreviations.</span>

    
  </p>
<ul><li><a href="#r-RegularExpressionSyntax" id="toc_rg" title="This table lists the meta-characters that you can use as regular expressions.">Regular Expression Syntax</a></li><li><a href="#r-Abbreviations" id="toc_rg" title="This table lists supported abbreviations, such as \d instead of [0-9].">Abbreviations</a></li></ul>
</p></td></tr></table></td></tr></table>

  

  

  

  

  <div class="topic reference nested1" id="r-RegularExpressionSyntax">
    <h2 class="title topictitle2">Regular Expression Syntax</h2>

    
    <div class="body refbody"><p class="abstract"><span class="shortdesc">This table lists the meta-characters that you can use as regular expressions.
      </span>

      
    </p>


      

      
    
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="void" border="1" rules="all">
          
          
          <thead class="thead" align="left">
            <tr class="row">
              <th class="entry" valign="top" width="NaN" id="d225132e40">Metacharacter 	 </th>

              <th class="entry" valign="top" width="NaN" id="d225132e43">
                Meaning
              </th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr class="row">
              <td class="entry" valign="top" width="NaN" headers="d225132e40 ">
                .

              </td>

              <td class="entry" valign="top" width="NaN" headers="d225132e43 ">Matches any single character.
</td>

            </tr>

            <tr class="row">
              <td class="entry" valign="top" width="NaN" headers="d225132e40 ">[ ]
</td>

              <td class="entry" valign="top" width="NaN" headers="d225132e43 ">Indicates a character class. Matches any character inside the
brackets (for example, <kbd class="ph userinput">[abc]</kbd> matches "a", "b", and "c").
</td>

            </tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e40 ">^
</td>
<td class="entry" valign="top" width="NaN" headers="d225132e43 ">If this meta-character occurs at the start of a character class, it
negates the character class. A negated character class matches any
character except those inside the brackets (for example,
<kbd class="ph userinput">[^abc]</kbd> matches all characters except "a", "b", and "c").
<p>If ^ is at the beginning of the regular expression, it
matches the beginning of the input (for example,<kbd class="ph userinput">^[abc]</kbd>
will only match input that begins with "a", "b", or "c").
</p></td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e40 ">-
</td>
<td class="entry" valign="top" width="NaN" headers="d225132e43 ">In a character class, indicates a range of characters (for example,
<kbd class="ph userinput">[0-9]</kbd> matches any of the digits "0" through "9").
</td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e40 ">?
</td>
<td class="entry" valign="top" width="NaN" headers="d225132e43 ">Indicates that the preceding expression is optional: it matches
once or not at all (for example, <kbd class="ph userinput">[0-9][0-9]?</kbd> matches "2"
and "12").
</td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e40 ">+</td>
<td class="entry" valign="top" width="NaN" headers="d225132e43 ">Indicates that the preceding expression matches one or more times
(for example, <kbd class="ph userinput">[0-9]+</kbd> matches "1", "13", "456", and so on).
</td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e40 ">*</td>
<td class="entry" valign="top" width="NaN" headers="d225132e43 ">Indicates that the preceding expression matches zero or more times.
</td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e40 ">??, +?, *?
</td>
<td class="entry" valign="top" width="NaN" headers="d225132e43 ">Non-greedy versions of ?, +, and *.
These match as little as possible, unlike the greedy versions that
match as much as possible (for example, given the input
"&lt;abc&gt;&lt;def&gt;", <kbd class="ph userinput">&lt;.*?&gt;</kbd> matches
"&lt;abc&gt;" while <kbd class="ph userinput">&lt;.*&gt;</kbd> matches
"&lt;abc&gt;&lt;def&gt;").
</td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e40 ">( )
</td>
<td class="entry" valign="top" width="NaN" headers="d225132e43 ">Grouping operator. Example: <kbd class="ph userinput">(\d+,)*\d+</kbd> matches a list of
numbers separated by commas (for example, "1" or "1,23,456").
</td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e40 ">{ }
</td>
<td class="entry" valign="top" width="NaN" headers="d225132e43 ">Indicates a match group.
</td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e40 ">\
</td>
<td class="entry" valign="top" width="NaN" headers="d225132e43 "><p>Escape character: interpret the next character literally (for
example, <kbd class="ph userinput">[0-9]+</kbd> matches one or more digits, but <kbd class="ph userinput">[0-9]\+</kbd> matches a digit followed by a plus character).
Also used for abbreviations (such as <kbd class="ph userinput">\a</kbd> for any
alphanumeric character; see the following table).</p><p>If \ is followed by a number n, it matches the nth match group (starting from 0). Example: <kbd class="ph userinput">&lt;{.*?}&gt;.*&lt;/\0&gt;</kbd> matches "&lt;head&gt;Contents&lt;/head&gt;".</p></td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e40 ">$
</td>
<td class="entry" valign="top" width="NaN" headers="d225132e43 ">At the end of a regular expression, this character matches the end
of the input (for example,<kbd class="ph userinput">[0-9]$</kbd> matches a digit at the
end of the input).
</td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e40 ">|
</td>
<td class="entry" valign="top" width="NaN" headers="d225132e43 ">Alternation operator: separates two expressions, exactly one of
which matches (for example, <kbd class="ph userinput">T|the</kbd> matches "The" or "the").
</td>
</tr>

            <tr class="row">
              <td class="entry" valign="top" width="NaN" headers="d225132e40 ">!
</td>

              <td class="entry" valign="top" width="NaN" headers="d225132e43 ">Negation operator: the expression following ! does not
match the input (for example, <kbd class="ph userinput">a!b</kbd> matches "a" not followed
by "b").
</td>

            </tr>

          </tbody>

        </table>
</div>
</div>

  </div>


  <div class="topic reference nested1" id="r-Abbreviations">
    <p><map name="FPMap1"><area href="#hj-top" title="Back to Top" shape="rect" coords="416, 0, 435, 10"/></map><img border="0" src="../IconsReference/butix_top_wline.png" width="436" height="11" usemap="#FPMap1"/></p><h2 class="title topictitle2">Abbreviations</h2>

    
    <div class="body refbody"><p class="abstract"><span class="shortdesc">This table lists supported abbreviations, such as <kbd class="ph userinput">\d</kbd> instead of
<kbd class="ph userinput">[0-9]</kbd>.</span>


    	
    </p>

      
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="void" border="1" rules="all">
          
          
          <thead class="thead" align="left">
            <tr class="row">
              <th class="entry" valign="top" width="NaN" id="d225132e220">
                Abbreviation
              </th>

              <th class="entry" valign="top" width="NaN" id="d225132e223">Matches</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr class="row">
              <td class="entry" valign="top" width="NaN" headers="d225132e220 ">
                \a
              </td>

              <td class="entry" valign="top" width="NaN" headers="d225132e223 ">Any alphanumeric character: ([a-zA-Z0-9])</td>

            </tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e220 ">\b</td>
<td class="entry" valign="top" width="NaN" headers="d225132e223 ">White space (blank): ([ \\t])
</td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e220 ">\c</td>
<td class="entry" valign="top" width="NaN" headers="d225132e223 ">Any alphabetic character: ([a-zA-Z]) </td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e220 ">\d</td>
<td class="entry" valign="top" width="NaN" headers="d225132e223 ">Any decimal digit: ([0-9])
</td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e220 ">\h</td>
<td class="entry" valign="top" width="NaN" headers="d225132e223 ">Any hexadecimal digit: ([0-9a-fA-F])
</td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e220 ">\n</td>
<td class="entry" valign="top" width="NaN" headers="d225132e223 ">Newline: (\r|(\r?\n))
</td>
</tr>
<tr class="row"><td class="entry" valign="top" width="NaN" headers="d225132e220 ">\q</td>
<td class="entry" valign="top" width="NaN" headers="d225132e223 ">A quoted string: (\"[^\"]*\")|(\'[^\']*\')
</td>
</tr>

            <tr class="row">
              <td class="entry" valign="top" width="NaN" headers="d225132e220 ">\w</td>

              <td class="entry" valign="top" width="NaN" headers="d225132e223 ">A simple word: ([a-zA-Z]+)
</td>

            </tr>

            <tr class="row">
              <td class="entry" valign="top" width="NaN" headers="d225132e220 ">\z</td>

              <td class="entry" valign="top" width="NaN" headers="d225132e223 ">An integer: ([0-9]+)
</td>

            </tr>

          </tbody>

        </table>
</div>

    </div>

  </div>


</td></tr></table><script xmlns:mml="http://www.w3.org/1998/Math/MathML" type="text/javascript" src="../DSDocStats.js">/* */</script></body>
</html>