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, 22.06.2019 12:10
Linux is distributed under gnu gpl. why is this important? a. it ensures that only torvalds can profit from the sale of linux b. it prevents unknowledgeable users from downloading programs they don't know how to operate. c. it provides protection for the developers who created linux. d. it states that anyone can copy, modify, and share the program if changes are made public.
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
All of the following are characteristics that must be contained in any knowledge representation scheme except
Answers: 3
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Write a function called checkfactor that takes two arrays of positive numbers, firstnumberrow and secondnumberrow. checkfactor checks if the first entry in firstnumberrow is divisible by the first entry in secondnumberrow, and performs the same operation on the next array elements until all entries have been checked. all the numbers are positive and the number of entries in the arrays are the same. the function should return the identified divisible numbers in two row arrays named firstdivisible and seconddivisible.restrictions: branches or loops should not be used. the code must use the internal mod and logical functions.hint: the mod function should be used to determine if two numbers are divisible. ex: for num1 and num2 if mod(num1,num2) is 0, then the two numbers are divisible.this is matlab
Answers: 2
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
Computers and Technology, 16.10.2019 21:30