szabivan

dotv3

Feb 19th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. import java.util.regex.Pattern;
  2. import java.util.regex.Matcher;
  3.  
  4.  
  5. class Ideone
  6. {
  7.     public static void main (String[] args) throws java.lang.Exception
  8.     {
  9.         Pattern pattern = Pattern.compile("(?<=\\b\\d*)(\\d)(?=(?:\\d{3})+\\b)");
  10.         Matcher matcher = pattern.matcher("sanyi1234 12345678910 másiksanyi12 142857142");
  11.         System.out.println( matcher.replaceAll("$1.") );
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment