RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Pattern Title
Expression
^(?<Code>([^"']|"[^"]*")*)'(?<Comment>.*)$
Description
This expression separates a Visual Basic (VB) source code line into the code part and the comment part (if any, following an apostrophe character not enclosed in quote marks).
Matches
a = b ' Comment | a = "xy'z" ' Comment
Non-Matches
a = b | rem not supported
Author Rating: Not yet rated. Robert Altman
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials