package com.chinacreator.video.util;

public class UsermobUtil{
    private static final String USERMOB_REG = ".*(1\\d{10}).*";
    private static final String BLACK_CHAR_REG = "[\\s-]";
    
    public static boolean isValid(String usermob) {
        if (usermob == null) {
            return false;
        }
        usermob = usermob.replaceAll("[\\s-]", "");
        return usermob.matches(".*(1\\d{10}).*");
    }
    
    public static String format(String usermob) {
        usermob = usermob.replaceAll("[\\s-]", "");
        return usermob.replaceFirst(".*(1\\d{10}).*", "$1");
    }
}