"I am trying to remove the words starting with lowercase using regular expression but I am not getting the required output."
My input was "apply to this bill and are made a part thereof Illiam B GEISSLER"
import re
text = "apply to this bill and are made a part thereof Illam B GEISSLER"
result = re.sub(r"\w[a-z]", "", text)
print(result)
I got the output as " I B GEISSLER" Required output as " Illiam B GEISSLER"