Examveda

How can you replace a matched pattern with a new string using regular expressions in Python?

A. By using the sub() function from the re module

B. By using the replace() function

C. By using the new() function

D. By using the replace keyword

Answer: Option A


This Question Belongs to Python Program >> Regular Expressions In Python

Join The Discussion

Related Questions on Regular Expressions in Python