Computers and Technology

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’

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:00, itsyagirl11076
What is the process in which the software development team compiles information to determine the final product.
Answers: 3
image
Computers and Technology, 22.06.2019 19:20, bob4059
1)consider the following code snippet: #ifndef book_h#define book_hconst double max_cost = 1000.0; class book{public: book(); book(double new_cost); void set_cost(double new_cost); double get_cost() const; private: double cost; }; double calculate_terms(book bk); #endifwhich of the following is correct? a)the header file is correct as given. b)the definition of max_cost should be removed since header files should not contain constants. c)the definition of book should be removed since header files should not contain class definitions. d)the body of the calculate_terms function should be added to the header file.
Answers: 1
image
Computers and Technology, 22.06.2019 23:30, Nason156
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the name.
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, wwwcarolynzouowficz
3. what do the terms multipotentialite, polymath, or scanner mean?
Answers: 2
Do you know the correct answer?
In this challenge you will use the file regex_search_challenge_student. py to: 1. Write a regular e...

Questions in other subjects:

Konu
Mathematics, 26.08.2019 08:30