I have read this article: Regex to find input value attribute
and modified that regex string to:
string regexStr = "(?<1><\s*input\s+[^>]*)(?:(?<2>\sname\s*=\s*)(?<3>\w*find_me\w*)(?<4>[^>\s]*)(?<5>\3))(?<6>[^>]*>)";
var r = new Regex(regexStr, RegexOptions.IgnoreCase | RegexOptions.Singleline);
I'm trying to find this:
<INPUT TYPE="hidden" NAME="FIND_ME" VALUE="">
The above mentioned Regex doesn't find anything.
If i change this: \wfind_me\w to "" then it finds all inputs.
What is wrong?
1) I need to find INPUT & NAME = "FIND ME" 2) I don't know if any additional params will be there ( they may or may not ), the main is INPUT & NAME = "FIND ME".