Valiadate EmployeeNumber dynamically using RegEx
In my scenorio need to skip the known error while writing in log file in catch block.For example "The Employee Number 1256987 was not found"
but the employee number is dynamic (1256987).
I have assigned the string variable like
string knownError ="The Employee Number [+EmpNo+] was not found";
In catch block , i have to compare like this
if (knownError.contains(ex.message());
{
//some logic
}
else
{
log.writeline(ex.message());
}
How can i check [+EmpNo+] using RegEx.