Test, validate and match regular expressions
Matches words ending in 'berry' (case-insensitive) with several constraints using negative lookaheads. The pattern attempts to ensure the match isn't preceded by non-whitespace, isn't longer than 10 characters, doesn't contain 'berry' within a larger word, and isn't at the end of string. Note: the first lookahead has a syntax quirk in PCRE. Common use cases include filtering specific berry-related terms in text processing.