I've been looking online how to match a word in a sentence. But it always return false in .matches() method in https://www.freeformatter.com/java-regex-tester.html#ad-output
First scenario:
Word I'm looking for - App
The sentence - Test Data - Scripts - App - 1-sand
I'm using this regex (?<![a-zA-Z])App(?![a-zA-Z])
Second scenario:
Word I'm looking for - 1-sand
The sentence - Test Data - Scripts - App - 1-sand
I'm using this regex (?<![a-zA-Z])1-sand(?![a-zA-Z])
Both returns false for .matches() function