Mar-14-2019, 04:31 PM
Without regex (kiss):
To construct or check a regex, you should visit this site:
https://regex101.com/
poem.replace('ai', '*/*').replace('hi', '*/*')A regex, which will detect ai and hi:
r'ai|hi'You can use
re.sub
for replacement.To construct or check a regex, you should visit this site:
https://regex101.com/
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!