We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb5e8d8 commit 3dcb444Copy full SHA for 3dcb444
src/main/java/com/lightningkite/kotlin/text/String.ext.kt
@@ -6,7 +6,7 @@ package com.lightningkite.kotlin.text
6
*/
7
8
9
-val EmailRegularExpression: Regex = "[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}".toRegex(RegexOption.IGNORE_CASE)
+val EmailRegularExpression: Regex = "[a-z0-9!#\$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#\$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?".toRegex(RegexOption.IGNORE_CASE)
10
11
inline fun String.isEmail(): Boolean {
12
return matches(EmailRegularExpression)
0 commit comments