Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

test2

void main() {
  var s = '''<a id="courseName" class="sg-font-larger" href="javascript:SunGard.Hac.Home.ViewClassPopUp(3415315, 4, '/HomeAccess/Content/Student/ClassPopUp.aspx');">AP Human Geog- Grade 9 S2</a>
  <a id="courseName" class="sg-font-larger" href="javascript:SunGard.Hac.Home.ViewClassPopUp(3415315, 4, '/HomeAccess/Content/Student/ClassPopUp.aspx');">Soccer</a>
    <a id="courseName" class="sg-font-larger" href="javascript:SunGard.Hac.Home.ViewClassPopUp(3415315, 4, '/HomeAccess/Content/Student/ClassPopUp.aspx');">Physics</a>
''';
  String regex = "<a.*courseName.*>(.+?)</a>";
  RegExp regExp = new RegExp(regex);
Iterable<Match> matches = regExp.allMatches(s);
for (Match match in matches) {
  print("${match.group(1)}\n");
 }
}

//<a id.*courseName*.*?</a
//(?<=\()(.+?)(?=\))

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.