Full word search in PDF using Java | search text in PDF using Aspose.PDF

Is there a way to search a full word instead of partial match? E.g, if I search for “3”, only textfragments returned would be for word “3” only, not those one that are “13” or “39”. If I search for “only”, textfragment of “commonly” will not be returned etc.

@rye3000

You can search text with regular expressions to find exact match word. Please visit Search and Get Text from Pages of PDF Document.

TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber(@"\bonly\b");