String S = "<Form ID = loginform name = loginform action = chk_rule.php method = post> <input type = hidden value = nf3a5776z23th8npzppq54z1j0d9z032 name = uid>
</Form> ";
RegEx Re = new RegEx (@ "\ s + value = ([^ \ s>] + )");
Match m = Re. Match (s );
If (M. Success)
Console. writeline (M. Groups [1]. value );
++ ++
The start and end characters are fixed, that is, they do not contain regular metacharacters. In fact, using indexof may be better.
String start = "...";
String end = "...";
String S = "............";
Int I = S. indexof (start );
If (I> = 0)
{
Int J = S. indexof (end, I + start. Length );
If (j> 0)
{
String result = S. substring (I + start. length, j-i-Start.Length );
}
}
// ********************** Determine whether a string exists.
// If (system. text. regularexpressions. regEx. ismatch (HTML, "& uid =")
// {
// return true;
///}