1、统一了entrance
2、统一了部分跳转intent,传参返回intent 3、修改出dialogfragment 4、clipboardmanager等处理
This commit is contained in:
31
app/src/main/java/com/gh/common/util/PatternUtils.java
Normal file
31
app/src/main/java/com/gh/common/util/PatternUtils.java
Normal file
@ -0,0 +1,31 @@
|
||||
package com.gh.common.util;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @author CsHeng
|
||||
* @Date 17/05/2017
|
||||
* @Time 2:35 PM
|
||||
*/
|
||||
|
||||
public class PatternUtils {
|
||||
|
||||
public static final Pattern VALID_EMAIL_ADDRESS_REGEX =
|
||||
Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
public static final Pattern VALIDATE_URL_REGEX =
|
||||
Pattern.compile("((http://|ftp://|https://|www.))(([a-zA-Z0-9\\._-]+\\.[a-zA-Z]{2,6})|([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}))(:[0-9]{1,4})*(/[a-zA-Z0-9\\&%_\\./-~-]*)?");
|
||||
|
||||
public static boolean isEmailAddress(String emailStr) {
|
||||
Matcher matcher = VALID_EMAIL_ADDRESS_REGEX.matcher(emailStr);
|
||||
return matcher.matches();
|
||||
}
|
||||
|
||||
public static boolean isUrlAddress(String url) {
|
||||
Matcher matcher = VALIDATE_URL_REGEX.matcher(url);
|
||||
return matcher.matches();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user