Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 280da2a01a3d16776505ea3f476de84f > files > 119

icu-doc-3.8.1-2mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ICU 3.8: RegexMatcher Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li id="current"><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
  </ul></div>
<h1>RegexMatcher Class Reference</h1><!-- doxytag: class="RegexMatcher" --><!-- doxytag: inherits="UObject" -->class <a class="el" href="classRegexMatcher.html">RegexMatcher</a> bundles together a reular expression pattern and input text to which the expression can be applied.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="regex_8h-source.html">regex.h</a>&gt;</code>
<p>
<p>Inheritance diagram for RegexMatcher:
<p><center><img src="classRegexMatcher.png" usemap="#RegexMatcher_map" border="0" alt=""></center>
<map name="RegexMatcher_map">
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,94,80">
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,94,24">
</map>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#6d8082b5a33770e99ecbd73313bf7a50">RegexMatcher</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;regexp, <a class="el" href="pwin32_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a> flags, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a <a class="el" href="classRegexMatcher.html">RegexMatcher</a> for a regular expression.  <a href="#6d8082b5a33770e99ecbd73313bf7a50"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#47a4616e88fe34d85b440aa0fe6922b9">RegexMatcher</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;regexp, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;input, <a class="el" href="pwin32_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a> flags, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a <a class="el" href="classRegexMatcher.html">RegexMatcher</a> for a regular expression.  <a href="#47a4616e88fe34d85b440aa0fe6922b9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#0e08da6f535d3379399265768bd5adb4">~RegexMatcher</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#0e08da6f535d3379399265768bd5adb4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#3c83ab49b979b5c610819fee1fe8463f">matches</a> (<a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to match the entire input string against the pattern.  <a href="#3c83ab49b979b5c610819fee1fe8463f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#e78b44d7a82d8801f7f64e57a4379d64">matches</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> startIndex, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to match the input string, beginning at startIndex, against the pattern.  <a href="#e78b44d7a82d8801f7f64e57a4379d64"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#b04a667874c99f69ca9816240d934908">lookingAt</a> (<a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to match the input string, starting from the beginning, against the pattern.  <a href="#b04a667874c99f69ca9816240d934908"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#11a2d2416b6fe860f8d7451e00ff98b3">lookingAt</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> startIndex, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to match the input string, starting from the specified index, against the pattern.  <a href="#11a2d2416b6fe860f8d7451e00ff98b3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#0c7ef0d32a9dc7eb57d0d31d0a8fdb02">find</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find the next pattern match in the input string.  <a href="#0c7ef0d32a9dc7eb57d0d31d0a8fdb02"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#cf1bdc2eb74c284af653bf4a9cdc9040">find</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> start, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets this <a class="el" href="classRegexMatcher.html">RegexMatcher</a> and then attempts to find the next substring of the input string that matches the pattern, starting at the specified index.  <a href="#cf1bdc2eb74c284af653bf4a9cdc9040"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#f9eb36ab9c20d826c9f7b9a30e549714">group</a> (<a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a string containing the text matched by the previous match.  <a href="#f9eb36ab9c20d826c9f7b9a30e549714"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#01c6fc5b7b8f94e977454b61bd3e5d86">group</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> groupNum, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a string containing the text captured by the given group during the previous match operation.  <a href="#01c6fc5b7b8f94e977454b61bd3e5d86"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#0b77dbdacd46f87d66798609de379b22">groupCount</a> () const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of capturing groups in this matcher's pattern.  <a href="#0b77dbdacd46f87d66798609de379b22"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#351ea126aafac1068d955959c2334007">start</a> (<a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the index in the input string of the start of the text matched during the previous match operation.  <a href="#351ea126aafac1068d955959c2334007"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#1859d9ec67aea07c026118759b42955b">start</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> group, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the index in the input string of the start of the text matched by the specified capture group during the previous match operation.  <a href="#1859d9ec67aea07c026118759b42955b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#1d2fc8268bbd183c5973a8f312fce2a1">end</a> (<a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the index in the input string of the first character following the text matched during the previous match operation.  <a href="#1d2fc8268bbd183c5973a8f312fce2a1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#1ec8dc668c6ea2da4abdf812c6632961">end</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> group, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the index in the input string of the character following the text matched by the specified capture group during the previous match operation.  <a href="#1ec8dc668c6ea2da4abdf812c6632961"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classRegexMatcher.html">RegexMatcher</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#0564fa9029cf90afd6008e1c2863ff47">reset</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets this matcher.  <a href="#0564fa9029cf90afd6008e1c2863ff47"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classRegexMatcher.html">RegexMatcher</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#4a99ca232cfd20b0b233eac2c5905018">reset</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> index, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets this matcher, and set the current input position.  <a href="#4a99ca232cfd20b0b233eac2c5905018"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classRegexMatcher.html">RegexMatcher</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#afc5e4f9cb857068d0d6be4ef67ca8d0">reset</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;input)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets this matcher with a new input string.  <a href="#afc5e4f9cb857068d0d6be4ef67ca8d0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#c034aa42b933c68b4fc05943a6b8998d">input</a> () const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the input string being matched.  <a href="#c034aa42b933c68b4fc05943a6b8998d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classRegexPattern.html">RegexPattern</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#1f0d089448e9a1523464859eb227a789">pattern</a> () const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the pattern that is interpreted by this matcher.  <a href="#1f0d089448e9a1523464859eb227a789"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#fbac43b65b5fbf9ee488266617b0d3b2">replaceAll</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;replacement, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Replaces every substring of the input that matches the pattern with the given replacement string.  <a href="#fbac43b65b5fbf9ee488266617b0d3b2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#ff123653d65c8722c5526a360515f06d">replaceFirst</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;replacement, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Replaces the first substring of the input that matches the pattern with the replacement string.  <a href="#ff123653d65c8722c5526a360515f06d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classRegexMatcher.html">RegexMatcher</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#72aaaa7b77e35313ec18a76a32fe0b2d">appendReplacement</a> (<a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;dest, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;replacement, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Implements a replace operation intended to be used as part of an incremental find-and-replace.  <a href="#72aaaa7b77e35313ec18a76a32fe0b2d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#1342deb93a5e5280c997deaa140ebe32">appendTail</a> (<a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;dest)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">As the final step in a find-and-replace operation, append the remainder of the input string, starting at the position following the last <a class="el" href="classRegexMatcher.html#72aaaa7b77e35313ec18a76a32fe0b2d">appendReplacement()</a>, to the destination string.  <a href="#1342deb93a5e5280c997deaa140ebe32"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#d3a2b85b74c0345bf6f94a7c568d5191">split</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;input, <a class="el" href="classUnicodeString.html">UnicodeString</a> dest[], <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> destCapacity, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Split a string into fields.  <a href="#d3a2b85b74c0345bf6f94a7c568d5191"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#9ba9152845cd7fd210e0334bd948a11f">setTrace</a> (<a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> state)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">setTrace Debug function, enable/disable tracing of the matching engine.  <a href="#9ba9152845cd7fd210e0334bd948a11f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#9d3c98f67ccefc4c1eeda75925908411">getDynamicClassID</a> () const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ICU "poor man's RTTI", returns a UClassID for the actual class.  <a href="#9d3c98f67ccefc4c1eeda75925908411"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#925eadd2d94457014581c270d1e8dc64">getStaticClassID</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ICU "poor man's RTTI", returns a UClassID for this class.  <a href="#925eadd2d94457014581c270d1e8dc64"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6599d2ee7a324de7b810427abcdf1894"></a><!-- doxytag: member="RegexMatcher::RegexPattern" ref="6599d2ee7a324de7b810427abcdf1894" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#6599d2ee7a324de7b810427abcdf1894">RegexPattern</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1c2144b0e5f518674dffbf166bb18bc3"></a><!-- doxytag: member="RegexMatcher::RegexCImpl" ref="1c2144b0e5f518674dffbf166bb18bc3" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRegexMatcher.html#1c2144b0e5f518674dffbf166bb18bc3">RegexCImpl</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
class <a class="el" href="classRegexMatcher.html">RegexMatcher</a> bundles together a reular expression pattern and input text to which the expression can be applied. 
<p>
It includes methods for testing for matches, and for find and replace operations.<p>
Class <a class="el" href="classRegexMatcher.html">RegexMatcher</a> is not intended to be subclassed.<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable002612">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="regex_8h-source.html#l00451">451</a> of file <a class="el" href="regex_8h-source.html">regex.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="6d8082b5a33770e99ecbd73313bf7a50"></a><!-- doxytag: member="RegexMatcher::RegexMatcher" ref="6d8082b5a33770e99ecbd73313bf7a50" args="(const UnicodeString &amp;regexp, uint32_t flags, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RegexMatcher::RegexMatcher           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>regexp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a>&nbsp;</td>
          <td class="paramname"> <em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Construct a <a class="el" href="classRegexMatcher.html">RegexMatcher</a> for a regular expression. 
<p>
This is a convenience method that avoids the need to explicitly create a <a class="el" href="classRegexPattern.html">RegexPattern</a> object. Note that if several RegexMatchers need to be created for the same expression, it will be more efficient to separately create and cache a <a class="el" href="classRegexPattern.html">RegexPattern</a> object, and use its matcher() method to create the <a class="el" href="classRegexMatcher.html">RegexMatcher</a> objects.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>regexp</em>&nbsp;</td><td>The Regular Expression to be compiled. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>Regular expression options, such as case insensitive matching. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="uregex_8h.html#874989dfec4cbeb6baf4d1a51cb529ae909d2ed2c61e34cb62dc13e29f6923ec">UREGEX_CASE_INSENSITIVE</a> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Any errors are reported by setting this UErrorCode variable. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002631">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="47a4616e88fe34d85b440aa0fe6922b9"></a><!-- doxytag: member="RegexMatcher::RegexMatcher" ref="47a4616e88fe34d85b440aa0fe6922b9" args="(const UnicodeString &amp;regexp, const UnicodeString &amp;input, uint32_t flags, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RegexMatcher::RegexMatcher           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>regexp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a>&nbsp;</td>
          <td class="paramname"> <em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Construct a <a class="el" href="classRegexMatcher.html">RegexMatcher</a> for a regular expression. 
<p>
This is a convenience method that avoids the need to explicitly create a <a class="el" href="classRegexPattern.html">RegexPattern</a> object. Note that if several RegexMatchers need to be created for the same expression, it will be more efficient to separately create and cache a <a class="el" href="classRegexPattern.html">RegexPattern</a> object, and use its matcher() method to create the <a class="el" href="classRegexMatcher.html">RegexMatcher</a> objects. <p>
The matcher will retain a reference to the supplied input string, and all regexp pattern matching operations happen directly on the original string. It is critical that the string not be altered or deleted before use by the regular expression operations is complete.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>regexp</em>&nbsp;</td><td>The Regular Expression to be compiled. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>input</em>&nbsp;</td><td>The string to match. The matcher retains a reference to the caller's string; mo copy is made. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>Regular expression options, such as case insensitive matching. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="uregex_8h.html#874989dfec4cbeb6baf4d1a51cb529ae909d2ed2c61e34cb62dc13e29f6923ec">UREGEX_CASE_INSENSITIVE</a> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Any errors are reported by setting this UErrorCode variable. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002632">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="0e08da6f535d3379399265768bd5adb4"></a><!-- doxytag: member="RegexMatcher::~RegexMatcher" ref="0e08da6f535d3379399265768bd5adb4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual RegexMatcher::~RegexMatcher           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable002633">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="3c83ab49b979b5c610819fee1fe8463f"></a><!-- doxytag: member="RegexMatcher::matches" ref="3c83ab49b979b5c610819fee1fe8463f" args="(UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> RegexMatcher::matches           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Attempts to match the entire input string against the pattern. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A reference to a UErrorCode to receive any errors. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if there is a match </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002634">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="e78b44d7a82d8801f7f64e57a4379d64"></a><!-- doxytag: member="RegexMatcher::matches" ref="e78b44d7a82d8801f7f64e57a4379d64" args="(int32_t startIndex, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> RegexMatcher::matches           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>startIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Attempts to match the input string, beginning at startIndex, against the pattern. 
<p>
The match must extend to the end of the input string. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>startIndex</em>&nbsp;</td><td>The input string index at which to begin matching. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A reference to a UErrorCode to receive any errors. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if there is a match </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002635">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div><p>
<a class="anchor" name="b04a667874c99f69ca9816240d934908"></a><!-- doxytag: member="RegexMatcher::lookingAt" ref="b04a667874c99f69ca9816240d934908" args="(UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> RegexMatcher::lookingAt           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Attempts to match the input string, starting from the beginning, against the pattern. 
<p>
Like the <a class="el" href="classRegexMatcher.html#3c83ab49b979b5c610819fee1fe8463f">matches()</a> method, this function always starts at the beginning of the input string; unlike that function, it does not require that the entire input string be matched.<p>
If the match succeeds then more information can be obtained via the <code><a class="el" href="classRegexMatcher.html#351ea126aafac1068d955959c2334007">start()</a></code>, <code><a class="el" href="classRegexMatcher.html#1d2fc8268bbd183c5973a8f312fce2a1">end()</a></code>, and <code><a class="el" href="classRegexMatcher.html#f9eb36ab9c20d826c9f7b9a30e549714">group()</a></code> functions.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A reference to a UErrorCode to receive any errors. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if there is a match at the start of the input string. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002636">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="11a2d2416b6fe860f8d7451e00ff98b3"></a><!-- doxytag: member="RegexMatcher::lookingAt" ref="11a2d2416b6fe860f8d7451e00ff98b3" args="(int32_t startIndex, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> RegexMatcher::lookingAt           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>startIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Attempts to match the input string, starting from the specified index, against the pattern. 
<p>
The match may be of any length, and is not required to extend to the end of the input string. Contrast with match().<p>
If the match succeeds then more information can be obtained via the <code><a class="el" href="classRegexMatcher.html#351ea126aafac1068d955959c2334007">start()</a></code>, <code><a class="el" href="classRegexMatcher.html#1d2fc8268bbd183c5973a8f312fce2a1">end()</a></code>, and <code><a class="el" href="classRegexMatcher.html#f9eb36ab9c20d826c9f7b9a30e549714">group()</a></code> functions.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>startIndex</em>&nbsp;</td><td>The input string index at which to begin matching. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A reference to a UErrorCode to receive any errors. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if there is a match. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002637">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div><p>
<a class="anchor" name="0c7ef0d32a9dc7eb57d0d31d0a8fdb02"></a><!-- doxytag: member="RegexMatcher::find" ref="0c7ef0d32a9dc7eb57d0d31d0a8fdb02" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> RegexMatcher::find           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Find the next pattern match in the input string. 
<p>
The find begins searching the input at the location following the end of the previous match, or at the start of the string if there is no previous match. If a match is found, <code><a class="el" href="classRegexMatcher.html#351ea126aafac1068d955959c2334007">start()</a>, <a class="el" href="classRegexMatcher.html#1d2fc8268bbd183c5973a8f312fce2a1">end()</a></code> and <code><a class="el" href="classRegexMatcher.html#f9eb36ab9c20d826c9f7b9a30e549714">group()</a></code> will provide more information regarding the match. <p>
Note that if the input string is changed by the application, use find(startPos, status) instead of <a class="el" href="classRegexMatcher.html#0c7ef0d32a9dc7eb57d0d31d0a8fdb02">find()</a>, because the saved starting position may not be valid with the altered input string. <dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if a match is found. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002638">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="cf1bdc2eb74c284af653bf4a9cdc9040"></a><!-- doxytag: member="RegexMatcher::find" ref="cf1bdc2eb74c284af653bf4a9cdc9040" args="(int32_t start, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> RegexMatcher::find           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Resets this <a class="el" href="classRegexMatcher.html">RegexMatcher</a> and then attempts to find the next substring of the input string that matches the pattern, starting at the specified index. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>the position in the input string to begin the search </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A reference to a UErrorCode to receive any errors. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if a match is found. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002639">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="f9eb36ab9c20d826c9f7b9a30e549714"></a><!-- doxytag: member="RegexMatcher::group" ref="f9eb36ab9c20d826c9f7b9a30e549714" args="(UErrorCode &amp;status) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> RegexMatcher::group           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns a string containing the text matched by the previous match. 
<p>
If the pattern can match an empty string, an empty string may be returned. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>a string containing the matched input text. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002640">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="01c6fc5b7b8f94e977454b61bd3e5d86"></a><!-- doxytag: member="RegexMatcher::group" ref="01c6fc5b7b8f94e977454b61bd3e5d86" args="(int32_t groupNum, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> RegexMatcher::group           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>groupNum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns a string containing the text captured by the given group during the previous match operation. 
<p>
Group(0) is the entire match.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>groupNum</em>&nbsp;</td><td>the capture group number </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed and U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the captured text </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002641">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="0b77dbdacd46f87d66798609de379b22"></a><!-- doxytag: member="RegexMatcher::groupCount" ref="0b77dbdacd46f87d66798609de379b22" args="() const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> RegexMatcher::groupCount           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the number of capturing groups in this matcher's pattern. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the number of capture groups </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002642">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="351ea126aafac1068d955959c2334007"></a><!-- doxytag: member="RegexMatcher::start" ref="351ea126aafac1068d955959c2334007" args="(UErrorCode &amp;status) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> RegexMatcher::start           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the index in the input string of the start of the text matched during the previous match operation. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>a reference to a UErrorCode to receive any errors. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The position in the input string of the start of the last match. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002643">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="1859d9ec67aea07c026118759b42955b"></a><!-- doxytag: member="RegexMatcher::start" ref="1859d9ec67aea07c026118759b42955b" args="(int32_t group, UErrorCode &amp;status) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> RegexMatcher::start           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>group</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the index in the input string of the start of the text matched by the specified capture group during the previous match operation. 
<p>
Return -1 if the capture group exists in the pattern, but was not part of the last match.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>group</em>&nbsp;</td><td>the capture group number </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed, and U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the start position of substring matched by the specified group. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002644">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="1d2fc8268bbd183c5973a8f312fce2a1"></a><!-- doxytag: member="RegexMatcher::end" ref="1d2fc8268bbd183c5973a8f312fce2a1" args="(UErrorCode &amp;status) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> RegexMatcher::end           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the index in the input string of the first character following the text matched during the previous match operation. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the index of the last character matched, plus one. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002645">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="1ec8dc668c6ea2da4abdf812c6632961"></a><!-- doxytag: member="RegexMatcher::end" ref="1ec8dc668c6ea2da4abdf812c6632961" args="(int32_t group, UErrorCode &amp;status) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> RegexMatcher::end           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>group</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the index in the input string of the character following the text matched by the specified capture group during the previous match operation. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>group</em>&nbsp;</td><td>the capture group number </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed and U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the index of the first character following the text captured by the specifed group during the previous match operation. Return -1 if the capture group exists in the pattern but was not part of the match. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002646">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="0564fa9029cf90afd6008e1c2863ff47"></a><!-- doxytag: member="RegexMatcher::reset" ref="0564fa9029cf90afd6008e1c2863ff47" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classRegexMatcher.html">RegexMatcher</a>&amp; RegexMatcher::reset           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Resets this matcher. 
<p>
The effect is to remove any memory of previous matches, and to cause subsequent <a class="el" href="classRegexMatcher.html#0c7ef0d32a9dc7eb57d0d31d0a8fdb02">find()</a> operations to begin at the beginning of the input string.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>this <a class="el" href="classRegexMatcher.html">RegexMatcher</a>. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002647">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="4a99ca232cfd20b0b233eac2c5905018"></a><!-- doxytag: member="RegexMatcher::reset" ref="4a99ca232cfd20b0b233eac2c5905018" args="(int32_t index, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classRegexMatcher.html">RegexMatcher</a>&amp; RegexMatcher::reset           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Resets this matcher, and set the current input position. 
<p>
The effect is to remove any memory of previous matches, and to cause subsequent <a class="el" href="classRegexMatcher.html#0c7ef0d32a9dc7eb57d0d31d0a8fdb02">find()</a> operations to begin at the specified position in the input string.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>this <a class="el" href="classRegexMatcher.html">RegexMatcher</a>. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002648">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div><p>
<a class="anchor" name="afc5e4f9cb857068d0d6be4ef67ca8d0"></a><!-- doxytag: member="RegexMatcher::reset" ref="afc5e4f9cb857068d0d6be4ef67ca8d0" args="(const UnicodeString &amp;input)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classRegexMatcher.html">RegexMatcher</a>&amp; RegexMatcher::reset           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>input</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Resets this matcher with a new input string. 
<p>
This allows instances of <a class="el" href="classRegexMatcher.html">RegexMatcher</a> to be reused, which is more efficient than creating a new <a class="el" href="classRegexMatcher.html">RegexMatcher</a> for each input string to be processed. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>input</em>&nbsp;</td><td>The new string on which subsequent pattern matches will operate. The matcher retains a reference to the callers string, and operates directly on that. Ownership of the string remains with the caller. Because no copy of the string is made, it is essential that the caller not delete the string until after regexp operations on it are done. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>this <a class="el" href="classRegexMatcher.html">RegexMatcher</a>. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002649">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="c034aa42b933c68b4fc05943a6b8998d"></a><!-- doxytag: member="RegexMatcher::input" ref="c034aa42b933c68b4fc05943a6b8998d" args="() const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; RegexMatcher::input           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the input string being matched. 
<p>
The returned string is not a copy, but the live input string. It should not be altered or deleted. <dl class="return" compact><dt><b>Returns:</b></dt><dd>the input string </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002650">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="1f0d089448e9a1523464859eb227a789"></a><!-- doxytag: member="RegexMatcher::pattern" ref="1f0d089448e9a1523464859eb227a789" args="() const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classRegexPattern.html">RegexPattern</a>&amp; RegexMatcher::pattern           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the pattern that is interpreted by this matcher. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the <a class="el" href="classRegexPattern.html">RegexPattern</a> for this <a class="el" href="classRegexMatcher.html">RegexMatcher</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002651">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="fbac43b65b5fbf9ee488266617b0d3b2"></a><!-- doxytag: member="RegexMatcher::replaceAll" ref="fbac43b65b5fbf9ee488266617b0d3b2" args="(const UnicodeString &amp;replacement, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> RegexMatcher::replaceAll           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>replacement</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Replaces every substring of the input that matches the pattern with the given replacement string. 
<p>
This is a convenience function that provides a complete find-and-replace-all operation.<p>
This method first resets this matcher. It then scans the input string looking for matches of the pattern. Input that is not part of any match is left unchanged; each match is replaced in the result by the replacement string. The replacement string may contain references to capture groups.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>replacement</em>&nbsp;</td><td>a string containing the replacement text. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>a reference to a UErrorCode to receive any errors. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>a string containing the results of the find and replace. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002652">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ff123653d65c8722c5526a360515f06d"></a><!-- doxytag: member="RegexMatcher::replaceFirst" ref="ff123653d65c8722c5526a360515f06d" args="(const UnicodeString &amp;replacement, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> RegexMatcher::replaceFirst           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>replacement</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Replaces the first substring of the input that matches the pattern with the replacement string. 
<p>
This is a convenience function that provides a complete find-and-replace operation.<p>
This function first resets this <a class="el" href="classRegexMatcher.html">RegexMatcher</a>. It then scans the input string looking for a match of the pattern. Input that is not part of the match is appended directly to the result string; the match is replaced in the result by the replacement string. The replacement string may contain references to captured groups.<p>
The state of the matcher (the position at which a subsequent <a class="el" href="classRegexMatcher.html#0c7ef0d32a9dc7eb57d0d31d0a8fdb02">find()</a> would begin) after completing a <a class="el" href="classRegexMatcher.html#ff123653d65c8722c5526a360515f06d">replaceFirst()</a> is not specified. The <a class="el" href="classRegexMatcher.html">RegexMatcher</a> should be reset before doing additional <a class="el" href="classRegexMatcher.html#0c7ef0d32a9dc7eb57d0d31d0a8fdb02">find()</a> operations.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>replacement</em>&nbsp;</td><td>a string containing the replacement text. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>a reference to a UErrorCode to receive any errors. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>a string containing the results of the find and replace. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002653">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="72aaaa7b77e35313ec18a76a32fe0b2d"></a><!-- doxytag: member="RegexMatcher::appendReplacement" ref="72aaaa7b77e35313ec18a76a32fe0b2d" args="(UnicodeString &amp;dest, const UnicodeString &amp;replacement, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classRegexMatcher.html">RegexMatcher</a>&amp; RegexMatcher::appendReplacement           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>replacement</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Implements a replace operation intended to be used as part of an incremental find-and-replace. 
<p>
The input string, starting from the end of the previous replacement and ending at the start of the current match, is appended to the destination string. Then the replacement string is appended to the output string, including handling any substitutions of captured text.<p>
For simple, prepackaged, non-incremental find-and-replace operations, see <a class="el" href="classRegexMatcher.html#ff123653d65c8722c5526a360515f06d">replaceFirst()</a> or <a class="el" href="classRegexMatcher.html#fbac43b65b5fbf9ee488266617b0d3b2">replaceAll()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>A <a class="el" href="classUnicodeString.html">UnicodeString</a> to which the results of the find-and-replace are appended. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>replacement</em>&nbsp;</td><td>A <a class="el" href="classUnicodeString.html">UnicodeString</a> that provides the text to be substituted for the input text that matched the regexp pattern. The replacement text may contain references to captured text from the input. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed, and U_INDEX_OUTOFBOUNDS_ERROR if the replacement text specifies a capture group that does not exist in the pattern.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>this <a class="el" href="classRegexMatcher.html">RegexMatcher</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002654">Stable:</a></b></dt><dd>ICU 2.4</dd></dl>

</div>
</div><p>
<a class="anchor" name="1342deb93a5e5280c997deaa140ebe32"></a><!-- doxytag: member="RegexMatcher::appendTail" ref="1342deb93a5e5280c997deaa140ebe32" args="(UnicodeString &amp;dest)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; RegexMatcher::appendTail           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>dest</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
As the final step in a find-and-replace operation, append the remainder of the input string, starting at the position following the last <a class="el" href="classRegexMatcher.html#72aaaa7b77e35313ec18a76a32fe0b2d">appendReplacement()</a>, to the destination string. 
<p>
<code><a class="el" href="classRegexMatcher.html#1342deb93a5e5280c997deaa140ebe32">appendTail()</a></code> is intended to be invoked after one or more invocations of the <code><a class="el" href="classRegexMatcher.html#72aaaa7b77e35313ec18a76a32fe0b2d">RegexMatcher::appendReplacement()</a></code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>A <a class="el" href="classUnicodeString.html">UnicodeString</a> to which the results of the find-and-replace are appended. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the destination string. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002655">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="d3a2b85b74c0345bf6f94a7c568d5191"></a><!-- doxytag: member="RegexMatcher::split" ref="d3a2b85b74c0345bf6f94a7c568d5191" args="(const UnicodeString &amp;input, UnicodeString dest[], int32_t destCapacity, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> RegexMatcher::split           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td>
          <td class="paramname"> <em>dest</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>destCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Split a string into fields. 
<p>
Somewhat like <a class="el" href="classRegexMatcher.html#d3a2b85b74c0345bf6f94a7c568d5191">split()</a> from Perl. The pattern matches identify delimiters that separate the input into fields. The input data between the matches becomes the fields themselves. <p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>input</em>&nbsp;</td><td>The string to be split into fields. The field delimiters match the pattern (in the "this" object). This matcher will be reset to this input string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>An array of UnicodeStrings to receive the results of the split. This is an array of actual <a class="el" href="classUnicodeString.html">UnicodeString</a> objects, not an array of pointers to strings. Local (stack based) arrays can work well here. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destCapacity</em>&nbsp;</td><td>The number of elements in the destination array. If the number of fields found is less than destCapacity, the extra strings in the destination array are not altered. If the number of destination strings is less than the number of fields, the trailing part of the input string, including any field delimiters, is placed in the last destination string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A reference to a UErrorCode to receive any errors. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The number of fields into which the input string was split. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002656">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="9ba9152845cd7fd210e0334bd948a11f"></a><!-- doxytag: member="RegexMatcher::setTrace" ref="9ba9152845cd7fd210e0334bd948a11f" args="(UBool state)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RegexMatcher::setTrace           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>state</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
setTrace Debug function, enable/disable tracing of the matching engine. 
<p>
For internal ICU development use only. DO NO USE!!!! <dl compact><dt><b><a class="el" href="internal.html#_internal000182">Internal:</a></b></dt><dd>Do not use. This API is for interal use only. </dd></dl>

</div>
</div><p>
<a class="anchor" name="925eadd2d94457014581c270d1e8dc64"></a><!-- doxytag: member="RegexMatcher::getStaticClassID" ref="925eadd2d94457014581c270d1e8dc64" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a> RegexMatcher::getStaticClassID           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
ICU "poor man's RTTI", returns a UClassID for this class. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable002657">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

</div>
</div><p>
<a class="anchor" name="9d3c98f67ccefc4c1eeda75925908411"></a><!-- doxytag: member="RegexMatcher::getDynamicClassID" ref="9d3c98f67ccefc4c1eeda75925908411" args="() const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a> RegexMatcher::getDynamicClassID           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
ICU "poor man's RTTI", returns a UClassID for the actual class. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable002658">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

<p>
Implements <a class="el" href="classUObject.html#ce1dd31fb2c6f2c07dfebe8fd240ec37">UObject</a>.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="regex_8h-source.html">regex.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Fri Sep 14 12:59:44 2007 for ICU 3.8 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>