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 2
Title Test Details C# or Java Comments
Expression
(/\*[\d\D]*?\*/)|(\/\*(\s*|.*?)*\*\/)|(\/\/.*)|(/\\*[\\d\\D]*?\\*/)|([\r\n ]*//[^\r\n]*)+
Description
This regex searches multi-line, single-line, and XML comments present in C# file.
Matches
/* multi-line */ | // comment | /// XML Comment
Non-Matches
/* multi-line /*
Author Rating: The rating for this expression. Punit Ganshani
Title Test Details VB.NET or VB Comments
Expression
(REM [\d\D]*?[\r\n])|(?<SL>\'[\d\D]*?[\r\n])
Description
Filters out VB.NET and VB6.0 comments.
Matches
REM comment | 'comment | ''' XML comment
Non-Matches
REMA | text='test'
Author Rating: The rating for this expression. Punit Ganshani
   Displaying page 1 of 1 pages; Items 1 to 2

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