Skip to content

Commit 954edf9

Browse files
committed
W1401: Anomalous backslash in string: '\d'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
1 parent 442c2d2 commit 954edf9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

0005-Regular-Expressions-Search/regex_search.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,10 @@
7474
RESULT = re.search(r'cat|dog|parrot', 'I have a zebra')
7575
print(bool(RESULT)) # Output: False
7676

77-
print('\d : Matches any digit (equivalent to [0-9])')
77+
print('Slash \d : Matches any digit (equivalent to [0-9])')
7878

7979
RESULT = re.search(r'\d', 'Hello 123')
8080
print(bool(RESULT)) # Output: True
8181

8282
RESULT = re.search(r'\d', 'Hello')
8383
print(bool(RESULT)) # Output: False
84-
85-
86-

0 commit comments

Comments
 (0)