Suppose a string:
s = 'F3·Compute·Introduction to Methematical Thinking.pdf'
I substitute F3·Compute·
with ''
using regex
In [23]: re.sub(r'F3?Compute?', '',s)
Out[23]: 'F3·Compute·Introduction to Methematical Thinking.pdf'
It failed to work as I intented
When tried,
In [21]: re.sub(r'F3·Compute·', '', 'F3·Compute·Introduction to Methematical Thinking.pdf')
Out[21]: 'Introduction to Methematical Thinking.pdf'
What's the problem with my regex pattern?