I have solved this by changing the expression as follows...
Regex rx = new Regex(@"password='([a-zA-Z0-9\\%^&_*]+)\'");
--------------
again i have another question... Here is my updated expression...
string x = "user = 'sa' password='e X65dere!@#$%^&*()' server = 'localhost'";
Regex rx = new Regex(@"password=\'([a-zA-Z0-9\\!@#$%^&*|() _'""*-+{}<>,.;/?:~`\[\]\\\\]+)\'");
var r = rx.Match(x);
if (r.Groups.Count > 0)
{
var g1 = r.Groups[0];
MessageBox.Show(g1.ToString());
}
In this case it will match for every small & large cap letters, numbers and special characters except
= . If the password contains
= the expression fails... can you please help?
Regards
Sebastian