i want search a value in on row like this
<p align='center'><input type='hidden' name='e79e7ec' value='15302f565b'>
i need name=” value and value=” value 😛 create this code , but this code dosent work
Regex rloginRand = new Regex(@'<p align=center><input type=hidden name=\w*'); Match mloginRand = rloginRand.Match(source); string loginrand = ''; if (mloginRand.Success) { loginrand = mloginRand.ToString().Replace('<p align=center><input type=hidden name=', ''); } string loginrnd = ''; Regex rloginRnd = new Regex(@'name='+ loginrand+'value=\w*'); Match mloginRnd = rloginRnd.Match(source); if (mloginRand.Success) { loginrnd = mloginRnd.ToString().Replace('name='+loginrand+' value=', ''); }
error is
Form1.cs(71,69): error CS1009: Unrecognized escape sequence
at this line
Regex rloginRnd = new Regex(@’name=’+ loginrand+’***value=\w****’);
You need to put an
@before each part of the string: