Test, validate and match regular expressions
Matches strings containing 'thank you', 'thank-you', or 'thankyou' (case-insensitive) while explicitly excluding any string that contains 'email' anywhere. The negative lookahead at the start anchor causes the entire match to fail if 'email' appears later in the text. Commonly used for filtering customer feedback, support tickets, or chat logs—e.g., detecting genuine gratitude while ignoring automated email-related messages.