I am extracting a string and need to check whether it follows a particular pattern
<![any word]>
if so I need to replace it with "". I am trying the following code
string1 = "<![if support]> hello"
string = re.sub(re.compile("<![.*?]>"),"",string1)
print(string)
But I am getting the output as
<![if support]> hello
I wish to get the output as hello. What am I doing wrong here?