We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 664fdbc commit 4856b17Copy full SHA for 4856b17
1 file changed
regular expressions/test.py
@@ -3,3 +3,14 @@
3
# verify that a string has a proper format (Email, phone)
4
# find a string and replace it with another string
5
# format data into the proper form for importing for example
6
+
7
+import re
8
9
+if re.search("ape.", "The ape was at the apex"):
10
+ print("There is an ape")
11
+theStr = "The ape was at the apex"
12
13
+for i in re.finditer("ape.", theStr):
14
+ locTuple = i.span()
15
+ print(locTuple)
16
+ print(theStr[locTuple[0]: locTuple[1]])
0 commit comments