字符串    <img="c:\Hlep_1-2.ico"">
要得结果  c:\Hlep_1-2.ico"
请问正则表达式怎么写

解决方案 »

  1.   

    string ResultString = null;
    try {
    ResultString = Regex.Match(SubjectString, "(?<=<img=\").*?(?=\">)").Groups[1].Value;
    } catch (ArgumentException ex) {
    // Syntax error in the regular expression
    }
      

  2.   

    string ResultString = null;
    try {
    ResultString = Regex.Match(SubjectString, "(?<=<img=\").*?(?=\">)").Value;
    } catch (ArgumentException ex) {
    // Syntax error in the regular expression
    }