regex - .NET regular expression parameters recognizer -


i try write .net regular expression recognising "parameters" in code language:

for example in code language have single line, in general don't think code-language, string line...

set = myfunc (@param1,@param2) #this in-line comment , 2 parameter not wil recognized @param3 @param4 

i need match @param1 , @param2 parameters in language.

i need perform search using .net regular expression. possible?

the regex this:

var rx = new regex(@"(?<!#.*)@[a-za-z0-9_]+"); var res = rx.matches(str).oftype<match>().toarray(); 

it return match each parameter before #, i've told in comment, it's primitive caveman club modern in comparison.

it looks @ + letters/numbers/_ not preceded # (the (?<!#.*)).


Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -