+ 2
Regular Expression
How to use regular expression to find 'Roy' in string: Roy plays football.
1 ответ
+ 3
import re
text="Roy plays football."
p=re.search("Roy", text)
if p:
print ("Found Roy!")
else:
print ("No Roy found.")
How to use regular expression to find 'Roy' in string: Roy plays football.