+ 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
11 Réponses
+ 3
Md. Nasif-ur-Rahman Rimon thanks but I'm not looking for that I need regex that find every repetition for me.
+ 3
BroFar thanks a lot.
+ 2
it's been a day no one answered yet😂😂
maybe my question is so weird!!!
+ 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
+ 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??
+ 2
BroFar
does it exist at all?
+ 2
Oma Falk sir do you know the answer??
+ 1
hamid this finds all duplicates w3schools
https://www.w3schools.in/java-program/java-program-find-duplicate-characters-string/
and an example by GeeksforGeeks to remove all duplicates.
https://www.google.com/amp/s/www.geeksforgeeks.org/remove-duplicates-from-a-given-string/amp/
+ 1
hamid you're welcome
+ 1
hamid aString.replaceAll("[^a-zA-Z0-9]","");
+ 1
What happened??
Seem leads to no where 😄😄