Question: Please i need some help with my programing assigment in Java Part 1. Use this test harness to play with regular expressions. This is the
Please i need some help with my programing assigment in Java


Part 1. Use this test harness to play with regular expressions. This is the same as the one in the tutorial, but it doesn't use the Console class. The Console was added to the jdk in version 1.6 import java ut i 1. Scanner; import import Java, uti regex Matcher public class Test public static void main (StringLI args) Scanner console new Scanner (System.in while true System. out.printin ("VnEnter your regex i String my Regex console next Line Pattern pattern Patter compile (myRegex) System. out print (ITV the String to search VnEnter String searchstring console next Line Matcher matcher attern match (searchString); er boolean found false while (una Lchepk Lind t tel out. for at. ("T fo the text V" s starting at "index Sd and ending a L index 8d. Sn" matcher group C), at. cher tart. matcher end found true if nd System out printin No match found. An Use the program above to demonstrate the use of Odot), star t (plus), Wd The use of t, and as greedy quantifiers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
