[Solved] ASP.Net RegularExpression Error: Unrecognized escape sequence

Firuz
 
on Apr 19, 2022 01:59 AM
588 Views

Hi!

How I want define function verify (string text) with in parentheses (),{} are correctly nested?

My meaning must check text are into parentheses.

Error showed: Unrecognized escape sequence

Regex regx = new Regex("^([a-zA-Z_]*?\)");
if(regx.IsMatch("test(test)test"))
{
 
}

 

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Apr 23, 2022 07:42 AM

Use @ symbol to the strings which no longer use the escape character \.