Search

Find Page Number With The Occurrence Of Pattern

Articles

Use this function to find the page number of the occurrence of the text matching a regex pattern.

Syntax

Find Page Number With The Occurrence Of Pattern (fid, regex_pattern, occurrence)

Parameters

Input Parameter Name Description
fid OutputXmlFID passed from the Doc Reader node
regex_pattern Regular expression to search
The regular expression must be in Python. To know more, click here
occurrence Occurrence of the pattern

Returns

Return Value Description
Page number Page number on which the pattern is present

Sample

Find Page Number With The Occurrence Of Pattern (FID, www.[A-Z]+\.(\.?[A-Z]+)+, 2)

  • Finds the page number in which the text matching the pattern www.<text>.<text> occurs for the 2nd time in the PDF having File ID FID.

The occurrence is considered only when the keyword has an exact match in the document.

To view all the Document functions, click here.

Did you find what you were looking for?