EDN Admin
Well-known member
One of the tool we use reads a XML file to generate the number of lines of code from given source file types (like.. java,sql etc..). Below is the line of code wirtten in the XML file which is used to ignore the lines in the source files which
have only the words "do" or "while".
<codeArea name="Begin/End tags" isCode="false" > <br/>
<expression>^s*begins*$</expression> <br/>
<expression>^s*ends*$</expression> <br/>
</codeArea>
In the same way, how can I write the code to ignore the "case" statements which is used with "switch" in programming languages. For example, in the below code i want to ignore "case" statements
<br/>
switch ((char)(e.KeyChar))
{<br/>
case b:
<br/>
case "Thr":
<br/>
case 1:<br/>
}
I tried below way, but it doesnt worked. could someone please help on it.
<br/>
<expression>^s*case[*]:s*$</expression>
View the full article
have only the words "do" or "while".
<codeArea name="Begin/End tags" isCode="false" > <br/>
<expression>^s*begins*$</expression> <br/>
<expression>^s*ends*$</expression> <br/>
</codeArea>
In the same way, how can I write the code to ignore the "case" statements which is used with "switch" in programming languages. For example, in the below code i want to ignore "case" statements
<br/>
switch ((char)(e.KeyChar))
{<br/>
case b:
<br/>
case "Thr":
<br/>
case 1:<br/>
}
I tried below way, but it doesnt worked. could someone please help on it.
<br/>
<expression>^s*case[*]:s*$</expression>
View the full article