I have a string like this:
i got sooome screeeewy inpuuuuut
I need to normalize it and beside other processing, I need to remove all repeated chars,
i.e. soooome becomes some and so on.
Grammar correctness does not matter.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You do not need regex for this. Simply use
str.squeeze:See live demo here.