So I'm trying to add two hashes to all strings that begin with a letter following a dot.
It should apply only if it is the beginning of the string. I'm new to regex, so I'm not sure how I should do the adding. Any help?
import re
string = "a. this is a sentence.bla bla."
string = re.sub(r"\A[a-h][.]","##", string)
The result is (obviously) "## this is a sentence.bla bla.".
How do I add to the string instead of replacing?
The result should be: "##a. this is a sentence.bla bla."