mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Allow unicode email addresses
This commit is contained in:
@@ -195,21 +195,13 @@ public class Helper {
|
||||
static final Pattern EMAIL_ADDRESS = Pattern.compile(
|
||||
"[\\S]{1,256}" +
|
||||
"\\@" +
|
||||
"[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}" +
|
||||
"[\\p{L}][\\p{L}0-9\\-\\_]{0,64}" +
|
||||
"(" +
|
||||
"\\." +
|
||||
"[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25}" +
|
||||
"[\\p{L}0-9][\\p{L}0-9\\-\\_]{0,25}" +
|
||||
")+"
|
||||
);
|
||||
|
||||
static final Pattern EMAIL_ADDRESS_UNICODE = Pattern.compile(
|
||||
"([\\p{L}\\_\\.\\-\\d]+)" +
|
||||
"@" +
|
||||
"([\\p{L}\\-\\.\\d]+)" +
|
||||
"((\\.(\\p{L}){2,63})+)"
|
||||
// ^([\p{L}\_\.\-\d]+)@([\p{L}\-\.\d]+)((\.(\p{L}){2,63})+)$
|
||||
);
|
||||
|
||||
private static final ExecutorService executor = getBackgroundExecutor(1, "helper");
|
||||
|
||||
static ExecutorService getBackgroundExecutor(int threads, final String name) {
|
||||
|
||||
Reference in New Issue
Block a user