Guest User

Untitled

a guest
Dec 11th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. public class done {
  2. public static void main(String[] args) {
  3. String input = "jjjjjaaaaasssspppeeerrrrr";
  4. System.out.println(input.replaceAll("(.)\\1{1,}", "$1"));
  5. }
  6. }
  7. //Output
  8. jasper
Add Comment
Please, Sign In to add comment