Regular expression EX1

xiaoxiao2021-03-06  47

Void DumpHrefs (String InputString)

{

Regex R;

Match m;

R = New Regex ("HREF // S * = // s * (?: /" (? <1> [^ / "] *) /" | (? <1> // s )) ",

Regexoptions.ignorecase | RegexOptions.comPiled;

For (M = R.Match (InputString); M.Success; m = m.nextmatch ())

{

Console.writeLine ("Found Href" M.Groups [1] "AT"

M.Groups [1] .index);

}

}

转载请注明原文地址:https://www.9cbs.com/read-81138.html

New Post(0)