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: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 07:30
What part of the interface displays the external references contained in a selected cell? the status bar the review tab the scroll bar the formula bar
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
From excel to powerpoint, you can copy and paste a. cell ranges and charts, one at a time. b. cell ranges and charts, simultaneously. c. charts only. d. cell ranges only.
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. a company wants to use online methods to target more customers. it decides to conduct a market research by collecting the data of a few customers with their consent. they want to track data of the sites that their customers frequently visit. which software can the company? a. spyware b. bots c. adware d. trojan horse e. rootkits
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
Computer programming is one type of what career
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 e...
Questions
question
Mathematics, 30.09.2021 19:10
question
Computers and Technology, 30.09.2021 19:10
question
Mathematics, 30.09.2021 19:10
Questions on the website: 13722362