Test, validate and match regular expressions
Extracts numeric OTP/verification codes from line-oriented text in two arrangements: a number at the start of a line followed by ' is' (e.g., '123456 is your code'), or a number at the end of a line preceded by 'is ' (e.g., 'Your code is 123456'). Lookahead and lookbehind assertions ensure only the digits are matched, making it ideal for parsing SMS or notification messages.