I want to replace the beginning two letters "or" in "organization" with "*" useing python's re.sub function. I read some books about regular expression that say \b
represents word boundary, so I used \bor
as the pattern. But I got:
>>> re.sub("\bor","*","organization")
'organization'
>>>
I think I should got *ganization. What's the matter and how should I use re pattern to get what I want? Thank you.