subject

In this challenge you will use the file regex_search_challenge_student. py to: 1.Write a regular expression that will find all occurrences of: ◦regular expression ◦regular-expression ◦regular:expression ◦regular&expression In the string: This is a string to search for a regular expression like regular expression or regular-expression or regular:expression or regular&expression 2.Assign the regular expression to a variable named pattern 3.Using the findall() method from the re package determine if there are occurrences in `search_string` ◦Assign the outcome of the findall() method to a variable called match1 4.If match1 is not None print to the console the pattern used to perform the match, followed by the word 'matched' 5.Otherwise Print to the console the pattern used to perform the match, followed by the words 'did not match' Regular Expression Search Challenge Using the Python string below to perform a search using a regular expression that you create. search_string=’’’This is a string to search for a regular expression like regular expression or regular-expression or regular:expression or regular&expression’’’ 1.Write a regular expression that will find all occurrences of: a. regular expression b. regular-expression c. regular:expression d. regular&expression in search_string 2.Assign the regular expression to a variable named pattern 3.Using the findall() method from the re package determine if there are occurrences in search_string 4.Assign the outcome of the findall() method to a variable called match1 5.If match1 is not None: a. Print to the console the pattern used to perform the match, followed by the word ‘matched’ 6.Otherwise: a. Print to the console the pattern used to perform the match, followed by the words ‘did not match’

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Think about some of the most memorable and forgettable games ever created. they can be games that were discussed in this unit or otherwise. what are some of the consistent factors that made certain games memorable to you? what were some of the consistent factors that made certain games forgettable to you? why? explain.
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen too
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
You are consulting for a beverage distributor who is interested in determining the benefits it could achieve from implementing new information systems. what will you advise as the first step?
Answers: 1
You know the right answer?
In this challenge you will use the file regex_search_challenge_student. py to: 1.Write a regular exp...
Questions
question
Mathematics, 27.09.2019 04:00
Questions on the website: 13722360