Ask Questions?

View Latest Questions

Advertisement


 
 

Java: Regex Exercises 1
Posted on: April 17, 2011 at 12:00 AM
This page discusses - Java: Regex Exercises 1

Java: Regex Exercises 1

Name _______________________________

Assume

String subject = "This is test 123 of <a href="http://here.there.tld">Hello</>";
String regex;
String result;
. . .
Pattern pat = Pattern.compile(regex);
Matcher mat = pat.matcher(subject);
if (mat.find()) {
    result = mat.group();
} else {
    result = "Failed";
}

Questions to be supplied.

Copyleft 2004 Fred Swartz MIT License
Advertisement


DMCA.com