
Python RegEx

Quiz
•
Other
•
12th Grade
•
Easy
Amy Austin
Used 6+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a RegEx used for in programming?
To format strings in a specific way
To encrypt and decrypt data
To generate random strings
To check if a string contains the specified search pattern
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which module in Python is used to work with Regular Expressions?
os
re
math
json
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the findall() function in Python's re module do?
Returns a list containing all matches
Replaces one or many matches with a string
Searches for the first white-space character in the string
Splits the string at each match
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What character signifies the start of a string in RegEx?
*
$
^
.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which special sequence is used to find a digit in a string with RegEx?
\d
\s
\D
\w
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the RegEx metacharacter '.' match?
A non-digit character
A whitespace character
A digit
Any character except the newline character
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to search for a match in a string, returning a Match object if there is a match?
split()
findall()
search()
sub()
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Java Strings

Quiz
•
1st Grade - Professio...
10 questions
Badkids And FunnyMike Test

Quiz
•
3rd - 12th Grade
13 questions
Nov 28th Unit 1-3 Review

Quiz
•
9th - 12th Grade
12 questions
Alfred's Music theory

Quiz
•
9th - 12th Grade
15 questions
Meme Quiz

Quiz
•
12th Grade
11 questions
Story Element Vocabulary

Quiz
•
9th - 12th Grade
10 questions
Industiral Shop Safety Practice

Quiz
•
12th Grade
12 questions
Calc CP - 7.1 Antiderivatives HW #2

Quiz
•
12th Grade
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade