commit
306a360f14
1 changed files with 3 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (C) 2011 Whisper Systems
|
||||
* Copyright (C) 2012 Whisper Systems
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -23,8 +23,7 @@ import android.telephony.PhoneNumberUtils;
|
|||
|
||||
public class NumberUtil {
|
||||
|
||||
private static final String emailExpression = "^[\\w\\-]([\\.\\w])+[\\w]+@([\\w\\-]+\\.)+[A-Z]{2,4}$";
|
||||
private static final Pattern emailPattern = Pattern.compile(emailExpression, Pattern.CASE_INSENSITIVE);
|
||||
private static final Pattern emailPattern = android.util.Patterns.EMAIL_ADDRESS;
|
||||
|
||||
public static boolean isValidEmail(String number) {
|
||||
Matcher matcher = emailPattern.matcher(number);
|
||||
|
|
Loading…
Add table
Reference in a new issue