# DocTextFinder Class

> A class used to extract words from a document using a regular expression.

- Product: Adobe PDF Library 21
- Language: .NET Framework
- Version: APDFL21.0.0PlusP1e
- HTML page: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/DocTextFinder
- Version index: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/llms.txt

```csharp
class DocTextFinder : SystemIDisposable
```

**Namespace:** `Datalogics::PDFL`

**Inherits from:** `SystemIDisposable`

## Description

A class used to extract words from a document using a regular expression.

**Uses types:** [`DocTextFinderConfig`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/DocTextFinderConfig.md), [`DocTextFinderMatch`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/DocTextFinderMatch.md), [`Document`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Document.md), [`WordFinderConfig`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/WordFinderConfig.md)

## Constructors

### DocTextFinder

```csharp
Datalogics.PDFL.DocTextFinder.DocTextFinder(Document doc, WordFinderConfig wbConfig)
```

*constructor*

**Parameters**

- `doc` ([`Document`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Document.md)): document to search
- `wbConfig` ([`WordFinderConfig`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/WordFinderConfig.md)): WordFinder configuration to use

Create a DocTextFinder

### DocTextFinder

```csharp
Datalogics.PDFL.DocTextFinder.DocTextFinder(Document doc, WordFinderConfig wbConfig, DocTextFinderConfig dtfConfig)
```

*constructor*

**Parameters**

- `doc` ([`Document`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Document.md)): document to search
- `wbConfig` ([`WordFinderConfig`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/WordFinderConfig.md)): WordFinder configuration to use
- `dtfConfig` ([`DocTextFinderConfig`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/DocTextFinderConfig.md)): DocTextFinder configuration to use

Create a DocTextFinder with a DocTextFinderConfig

## Methods

### Dispose

```csharp
void Datalogics.PDFL.DocTextFinder.Dispose()
```

**Returns:** `void`

### GetMatchList

```csharp
System.Collections.Generic.IList< DocTextFinderMatch > Datalogics.PDFL.DocTextFinder.GetMatchList(int beginPageNumber, int endPageNumber, string regexstr)
```

**Parameters**

- `beginPageNumber` (`int`): the beginning page number included in the search.
- `endPageNumber` (`int`): the ending page number included in the search.
- `regexstr` (`string`): the regular expression to use for the search.

**Returns:** [`System.Collections.Generic.IList< DocTextFinderMatch >`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/DocTextFinderMatch.md)

a structure containing matching phrases along with its quads.

Finds all matching strings for a given regular expression for the specified page range. It returns a vector containing words along with the page and matching phrase that was found.
