I’m using regular expressions to match a keyword. Is it possible to check for this keyword within ONLY the first 25 characters?
For example, I want to find "APPLE":
'Johnny picked an APPLE from the tree' – Match Found (within first 25 chars)
'Johnny picked something from a tree that had an APPLE' – Not Found (because APPLE does not exist within the first 25 chars).
Is there syntax for this?
A simple solution would be to slice off the 25 first characters and then do the regex matching.