Result Size: 625 x 571
demo_regex_match_group.py:
x
 
import re
#Search for an upper case "S" character in the beginning of a word, and print the word:
txt = "The rain in Spain"
x = re.search(r"\bS\w+", txt)
print(x.group())
C:\Users\My Name>python demo_regex_match_group.py
Spain