# GrapeCity.Documents.Word.RangeBaseFindReplaceExtensions

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Word_RangeBaseFindReplaceExtensions" data-uid="GrapeCity.Documents.Word.RangeBaseFindReplaceExtensions" class="text-break">RangeBaseFindReplaceExtensions Class
</h1>
  <div class="markdown level0 summary"><p>Provides find/replace extension methods for the <a class="xref" href="GrapeCity.Documents.Word.RangeBase.html">RangeBase</a> class.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">RangeBaseFindReplaceExtensions</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Word.html">GrapeCity.Documents.Word</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Word.dll</h6>
  <h5 id="GrapeCity_Documents_Word_RangeBaseFindReplaceExtensions_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static class RangeBaseFindReplaceExtensions</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Module RangeBaseFindReplaceExtensions</code></pre>
  </div>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Word_RangeBaseFindReplaceExtensions_Find_GrapeCity_Documents_Word_RangeBase_GrapeCity_Documents_Word_FindOptions_" data-uid="GrapeCity.Documents.Word.RangeBaseFindReplaceExtensions.Find(GrapeCity.Documents.Word.RangeBase,GrapeCity.Documents.Word.FindOptions)">
          <a class="xref" href="GrapeCity.Documents.Word.RangeBaseFindReplaceExtensions.Find.html#GrapeCity_Documents_Word_RangeBaseFindReplaceExtensions_Find_GrapeCity_Documents_Word_RangeBase_GrapeCity_Documents_Word_FindOptions_">Find(RangeBase, FindOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>In the current range, finds all occurrences of any text with formatting
specified by <a class="xref" href="GrapeCity.Documents.Word.FindOptions.FormattingOptions.html#GrapeCity_Documents_Word_FindOptions_FormattingOptions">FormattingOptions</a> set on
<code class="paramref">options</code>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_RangeBaseFindReplaceExtensions_Find_GrapeCity_Documents_Word_RangeBase_System_String_GrapeCity_Documents_Word_FindOptions_" data-uid="GrapeCity.Documents.Word.RangeBaseFindReplaceExtensions.Find(GrapeCity.Documents.Word.RangeBase,System.String,GrapeCity.Documents.Word.FindOptions)">
          <a class="xref" href="GrapeCity.Documents.Word.RangeBaseFindReplaceExtensions.Find.html#GrapeCity_Documents_Word_RangeBaseFindReplaceExtensions_Find_GrapeCity_Documents_Word_RangeBase_System_String_GrapeCity_Documents_Word_FindOptions_">Find(RangeBase, string, FindOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>In the current range, finds all occurrences of a specified <code class="paramref">findPattern</code>,
using specified <code class="paramref">options</code>.</p>
<p>
The <code class="paramref">findPattern</code> can contain regular expressions 
(use <a class="xref" href="GrapeCity.Documents.Word.FindOptions.RegularExpressions.html#GrapeCity_Documents_Word_FindOptions_RegularExpressions">RegularExpressions</a> to control this).
</p>
<p>
The following special tokens can be used in the <code class="paramref">findPattern</code>
regardless of whether regex are on or off:
<ul><li><span class="term">&amp;p</span>end of paragraph</li><li><span class="term">&amp;l</span>manual line break</li><li><span class="term">&amp;m</span>page break</li><li><span class="term">&amp;b</span>section break</li></ul>

<p>
To search for text with certain formatting, use <code class="paramref">options</code>
and set the <a class="xref" href="GrapeCity.Documents.Word.FindOptions.FormattingOptions.html#GrapeCity_Documents_Word_FindOptions_FormattingOptions">FormattingOptions</a> on it accordingly.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_RangeBaseFindReplaceExtensions_Replace_GrapeCity_Documents_Word_RangeBase_System_String_System_String_GrapeCity_Documents_Word_FindReplaceOptions_" data-uid="GrapeCity.Documents.Word.RangeBaseFindReplaceExtensions.Replace(GrapeCity.Documents.Word.RangeBase,System.String,System.String,GrapeCity.Documents.Word.FindReplaceOptions)">
          <a class="xref" href="GrapeCity.Documents.Word.RangeBaseFindReplaceExtensions.Replace.html#GrapeCity_Documents_Word_RangeBaseFindReplaceExtensions_Replace_GrapeCity_Documents_Word_RangeBase_System_String_System_String_GrapeCity_Documents_Word_FindReplaceOptions_">Replace(RangeBase, string, string, FindReplaceOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>In the current range, searches for a specified <code class="paramref">findPattern</code>,
and replaces it with a provided <code class="paramref">replaceText</code>,
using specified <code class="paramref">options</code>.</p>
<p>
The <code class="paramref">findPattern</code> can contain regular expressions 
(use <a class="xref" href="GrapeCity.Documents.Word.FindOptions.RegularExpressions.html#GrapeCity_Documents_Word_FindOptions_RegularExpressions">RegularExpressions</a> to control this).
</p>
<p>
The following special tokens can be used in the <code class="paramref">findPattern</code>
and in the <code class="paramref">replaceText</code> regardless of whether regex are on or off:
<ul><li><span class="term">&amp;p</span>end of paragraph</li><li><span class="term">&amp;l</span>manual line break</li><li><span class="term">&amp;m</span>page break</li><li><span class="term">&amp;b</span>section break</li></ul>

<p>
To search for text with certain formatting, use <code class="paramref">options</code>
and set the <a class="xref" href="GrapeCity.Documents.Word.FindOptions.FormattingOptions.html#GrapeCity_Documents_Word_FindOptions_FormattingOptions">FormattingOptions</a> on it accordingly.
</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
