Title |
Test
Find
Pattern Title
|
Expression |
(?:/\*[\w\W]*?\*/|//[^\n]*?$|\#[^\n]*?$) |
Description |
Return all comment lines (starts with //) and regions (serounded by /* */) as well as compiler arguments (#) in C# code |
Matches |
// some comment | #region myRegion | /* other comment */ |
Non-Matches |
for(int i = 0; i < 10; i++) | [XmlAttribute("somthing_else") | String name = "MyNa |
Author |
Rating:
Not yet rated.
Ittayy Ophir
|
Source |
|
Your Rating |
|
Title: Incorrectly matches "text /* stuff" more things "text */ stuff"
Name: Randal L. Schwartz
Date: 12/18/2005 9:30:06 PM
Comment:
Once again, a regex that should be replaced by a proper lexer. This regex doesn't note whether or not the start-end tags are inside double-quoted strings or other syntactic elements.