import re

text = 'Hi, How are you?'

#PATTERN = re.compile(r'\d{2}[-\./]([a-zA-Z]{3}|\d{2})[-\./]\d{4}') #date pattern
#PATTERN = re.compile(r'\w+@[a-z]+(\.[a-z]{2,3})+') #email pattern
#PATTERN = re.compile(r'(\+\d)?\d{3}[-\.]\d{3}\s?\d{4}') #phone number pattern
#PATTERN = re.compile(r'^(Hi).*\?$') #. used to match any character than new line
PATTERN = re.compile(r',') #phone number pattern
new_str = PATTERN.sub('##',text) #replaced , with ##
print(new_str)
#matches = PATTERN.search(text) #searches 1st instance of the match
#matches = PATTERN.finditer(text) #iteratively matches every instance of the match

#for i in matches:
    #print(i)
 #   print(i.group()) #returns the match value

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: