Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Please i need some help with my programing assigment in Java

image text in transcribedimage text in transcribed

image text in transcribed

Part 1. Use this test harncss to play with regular expressions. This is the same as the onc in the tutorial, but it docsn't usc the Console class. The Console was added to the jdk in version 1.6 import java uti Scanner import java Li regex.Pa Le import ia uti atcher ava, public class Test f public static void main (Stringil args) Scanner console new Scanner (System in) while true Sys Leni.nouta prin Ll Enter your regex String my Regex next Line Pattern pattern Patterns Gompijs (my Regex System eut printin ("AnEnter the String to scarch String searchString console ,next Line Matcher matcher pat tern. matcher (searchString) boolean tound false while (matcher find System out format "I found the text V" s\" starting at "index sd and ending a L index Bd. n'' match at Cher t.a rt. mat er. end found true if found) System. out.printin No match found. An") Use the program above to demonstrate the use of (dot), (star), (plus) The use of and as greedy quantifiers. Part 1. Use this test harncss to play with regular expressions. This is the same as the onc in the tutorial, but it docsn't usc the Console class. The Console was added to the jdk in version 1.6 import java uti Scanner import java Li regex.Pa Le import ia uti atcher ava, public class Test f public static void main (Stringil args) Scanner console new Scanner (System in) while true Sys Leni.nouta prin Ll Enter your regex String my Regex next Line Pattern pattern Patterns Gompijs (my Regex System eut printin ("AnEnter the String to scarch String searchString console ,next Line Matcher matcher pat tern. matcher (searchString) boolean tound false while (matcher find System out format "I found the text V" s\" starting at "index sd and ending a L index Bd. n'' match at Cher t.a rt. mat er. end found true if found) System. out.printin No match found. An") Use the program above to demonstrate the use of (dot), (star), (plus) The use of and as greedy quantifiers

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

Developing and delivering learning that is integrated with the job.

Answered: 1 week ago

Question

Use of assessments to determine trainees learning styles.

Answered: 1 week ago