Regex Tutorial | Regular Expression - Javatpoint
www.javatpoint.com › regexreplace = 's'. new_string = re.sub (pattern, replace, string) # This statement replaces those matched characters with a string stored in a replace variable. print (new_string) # This statement displays the new string after the replacement of characters. text = "Regular Expression is also referred as Regex."