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 3
Title Test Details Single-line code-comment groups
Expression
([\r\n ]*//[^\r\n]*)+
Description
Matches groups of single-line code comments. Comment sections will be returned as a single match.
Matches
// code comments
Non-Matches
Code
Author Rating: Not yet rated. T Rob
Title Test Details C# code string literal
Expression
(@\s*".*?")|("([^"\\]|\\.)*?")
Description
Matches C# string literals; verbatin and or normal.
Matches
"text" "te\"xt" @"text"
Non-Matches
text
Author Rating: Not yet rated. T Rob
Title Test Details C# keyword
Expression
\b(?<KEYWORD>abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string)\b
Description
matches a C# keyword.
Matches
for int using public
Non-Matches
forty intty usingty
Author Rating: Not yet rated. T Rob
   Displaying page 1 of 1 pages; Items 1 to 3

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