Test, validate and match regular expressions
This regex matches single-line comments that begin with a double forward slash (//) and continue until the end of the line. It's commonly used in C-style programming languages like JavaScript, Java, C++, and C# to identify or strip out inline comments from source code. The global flag allows it to find all matches in the input text.