Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.regex.Pattern;
- import java.util.regex.Matcher;
- class Ideone
- {
- public static void main (String[] args) throws java.lang.Exception
- {
- Pattern pattern = Pattern.compile("(?<=\\b\\d*)(\\d)(?=(?:\\d{3})+\\b)");
- Matcher matcher = pattern.matcher("sanyi1234 12345678910 másiksanyi12 142857142");
- System.out.println( matcher.replaceAll("$1.") );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment