Fill in the blanks to create a pattern that matches strings that contain 3 characters, out of which the last character is an exc | SoloLearn: Learn to code for FREE!

0

Fill in the blanks to create a pattern that matches strings that contain 3 characters, out of which the last character is an exc

can you help me

6/9/2017 8:53:10 AM

R.kishore

21 Answers

New Answer

+5

answer is r"..!$"

+4

You need to match two "any character", followed by an exclamation mark. In regular expressions, "any character" is matched by using a dot. And the exclamation mark is a regular character, so you match it using... an exclamation mark :) So you are looking for: ..!

+3

Sounds difficult and is difficult, sorry

+3

ill in the blanks to create a pattern that matches strings that contain 3 characters, out of which the last character is an exclamation mark. answer is r"..!$"

+2

the answer is r

+2

0

0

0

0

Helpful

0

Fill in the blanks to match strings that are not entirely composed of digits. import re pattern = r"[ ^ 0-9 ] " m = re.search(pattern, "Hi there!")

0

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

0

Fill in the blanks to create a pattern that matches strings that contain one or more 42s.

0

str = r "I am \r\a\w!"

0

r"(42)+$"

0

It's answer is r"..!$"

0

ans is r

-1

r"..! $"

-1

import re pattern = r"[^0-9]" m = re.search(pattern, "Hi there!")

-1

Ans is, ..!