I have a following text:
text = "upi xxxxxxxxxx manoj jayant xxx xxxxxxx532kvblhii"
I am trying to remove repeating pattern with word only containing x to get the ouput as below:
out = "upi manoj jayant xxxxxxx532kvblhii"
I have used following regex which is giving wrong output
re.sub('[x]', '', text)
out = "upi manoj jayant 532kvblhii"
Please help me to correct my regex.