Build, test, and debug regular expressions
This regex captures the sequence of word characters immediately preceding the literal 'api', using a positive lookahead to match the prefix without including 'api'. It is useful for extracting endpoint names or resource identifiers from URLs, code, or log files where the API suffix is present. The case-insensitive and multiline flags ensure it works across lines and handles varying capitalization.