[HELP]find any letter repetition in Java | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

[HELP]find any letter repetition in Java

take a look at my code yeah it works fine for Deja Vu in code couch but it doesn't remove every repetition. it just removes those letters which are next to each other. where's my mistake?? is there any other regex that remove any repetition?? https://code.sololearn.com/cC7C2u3aynqZ/?ref=app

14th Aug 2020, 3:34 PM
hamid
hamid - avatar
11 Answers
+ 3
Md. Nasif-ur-Rahman Rimon thanks but I'm not looking for that I need regex that find every repetition for me.
15th Aug 2020, 3:36 PM
hamid
hamid - avatar
+ 3
BroFar thanks a lot.
16th Aug 2020, 3:26 AM
hamid
hamid - avatar
+ 2
it's been a day no one answered yet😂😂 maybe my question is so weird!!!
15th Aug 2020, 3:46 PM
hamid
hamid - avatar
+ 2
BroFar the examples were really awesome but do you know if there is a regex like "(//w)//1+ " but for removing all of duplicated characters from a string.this regex "(//w)//1+ " just remove those characters that are next to each other
16th Aug 2020, 12:14 PM
hamid
hamid - avatar
+ 2
BroFar https://code.sololearn.com/cZ6ikR84H804/?ref=app sorry for asking a lot but why it doesn't work for me am I making a mistake??
16th Aug 2020, 3:55 PM
hamid
hamid - avatar
+ 2
BroFar does it exist at all?
19th Aug 2020, 3:44 AM
hamid
hamid - avatar
+ 2
Oma Falk sir do you know the answer??
20th Aug 2020, 5:10 PM
hamid
hamid - avatar
15th Aug 2020, 4:01 PM
BroFar
BroFar - avatar
+ 1
hamid you're welcome
16th Aug 2020, 3:36 AM
BroFar
BroFar - avatar
+ 1
hamid aString.replaceAll("[^a-zA-Z0-9]","");
16th Aug 2020, 1:21 PM
BroFar
BroFar - avatar
+ 1
What happened?? Seem leads to no where 😄😄
23rd Aug 2020, 11:11 AM
Mohammad.R7