# DocTextFinder Class

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

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2e
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/DocTextFinder
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/llms.txt

```java
class DocTextFinder
```

**Namespace:** `com::datalogics::PDFL`

## Description

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

**Uses types:** [`DocTextFinderConfig`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/DocTextFinderConfig.md), [`DocTextFinderMatch`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/DocTextFinderMatch.md), [`Document`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Document.md), [`WordFinderConfig`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/WordFinderConfig.md)

## Constructors

### DocTextFinder

```java
com.datalogics.PDFL.DocTextFinder.DocTextFinder(Document doc, WordFinderConfig wbConfig)
```

*constructor*

**Parameters**

- `doc` ([`Document`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Document.md)): document to search
- `wbConfig` ([`WordFinderConfig`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/WordFinderConfig.md)): WordFinder configuration to use

Create a DocTextFinder

### DocTextFinder

```java
com.datalogics.PDFL.DocTextFinder.DocTextFinder(Document doc, WordFinderConfig wbConfig, DocTextFinderConfig dtfConfig)
```

*constructor*

**Parameters**

- `doc` ([`Document`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Document.md)): document to search
- `wbConfig` ([`WordFinderConfig`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/WordFinderConfig.md)): WordFinder configuration to use
- `dtfConfig` ([`DocTextFinderConfig`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/DocTextFinderConfig.md)): DocTextFinder configuration to use

Create a DocTextFinder with a DocTextFinderConfig

## Methods

### delete

```java
synchronized void com.datalogics.PDFL.DocTextFinder.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.DocTextFinder.delete()
```

**Returns:** `synchronized void`

### finalize

```java
void com.datalogics.PDFL.DocTextFinder.finalize()
```

*protected*

**Returns:** `void`

### getMatchList

```java
java.util.List< DocTextFinderMatch > com.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:** [`java.util.List< DocTextFinderMatch >`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/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.
