Test, validate and match regular expressions
This regex matches an entire line that starts with the keyword "final", followed by a whitespace character, any sequence of characters, and ends with a semicolon. Using the global and multiline flags, it scans through codebases to find standalone final variable declarations or constant assignments on single lines. It is particularly useful in languages like Java, C++, or Dart where the "final" keyword is used to prevent variable reassignment.