Use possessive quantifiers in string identification regexes.