Search Header Logo

Regex Quiz

Authored by Tomas Martinez

Computers

12th Grade

DOK Level 1: Recall covered

Used 8+ times

Regex Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the regex pattern `^a` match?

Any string that contains an 'a'

A string that starts with 'a'

Any string that ends with 'a'

None of the above

Tags

DOK Level 1: Recall

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which regex pattern matches any single digit?

`\d`

`\D`

`\w`

`\s`

Tags

DOK Level 1: Recall

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the regex pattern `abc?` mean?

Matches a string 'ab' followed by zero or more 'c'

Matches a string 'ab' followed by one or more 'c'

Matches a string 'ab' followed by zero or one 'c'

Matches exactly the string 'abc'

Tags

DOK Level 1: Recall

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In regex, what does the `*` character specify?

The preceding element must appear exactly once

The preceding element must not appear at all

The preceding element can appear zero or more times

The preceding element can appear one or more times

Tags

DOK Level 1: Recall

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which regex pattern would you use to find sequences of one or more whitespace characters?

`\s+`

`\S`

`\d+`

`\w+`

Tags

DOK Level 1: Recall

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the function of the `|` operator in regex?

Matches either the expression before or the expression after the operator

Matches the expressions both before and after the operator

Indicates the start of a capture group

None of the above

Tags

DOK Level 1: Recall

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which regex pattern matches any character except newline?

`\.`

`\n`

`.`

`^`

Tags

DOK Level 1: Recall

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers