Home
Random
Log in
Settings
About David's Wiki
Disclaimers
David's Wiki
Search
Python: Difference between revisions
Page
Discussion
← Older edit
Newer edit →
Python
(view source)
Revision as of 02:50, 20 June 2022
3 bytes added
,
20 June 2022
→Regular Expressions (Regex)
Revision as of 15:21, 3 May 2022
(
view source
)
David
(
talk
|
contribs
)
(
→concurrrency
)
← Older edit
Revision as of 02:50, 20 June 2022
(
view source
)
David
(
talk
|
contribs
)
(
→Regular Expressions (Regex)
)
Newer edit →
Line 178:
Line 178:
import re
import re
my_regex = re.compile(r'height:(\d+)cm')
my_regex = re.compile(r'height:(\d+)cm')
my_match =
myReg
.match("height:33cm");
my_match =
my_regex
.match("height:33cm");
print(my_match[1])
print(my_match[1])
# 33
# 33
David
Bureaucrats
,
Interface administrators
,
Administrators
5,337
edits