I am trying to replace a string in Python 3 using regex. I need the string in s1 to be completely replaced with an empty string.
s1 = "/* 123 */" # Pattern /* n */ where n can be any integer s2 = re.sub(r'/*\s*\d+\s*/',"",s1) print(s2) Output(Actual) - /* 123 */ # nothing happens
Output (Expected) - BLANK