Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
cloud-phantom
/
common
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5c4ceb2e
authored
Apr 09, 2018
by
fanlongfei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into 'production'
Test See merge request
!4
parents
0f31ecb0
4c91d92c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
src/main/java/com/kingboy/common/utils/regex/RegexUtils.java
+6
-1
No files found.
src/main/java/com/kingboy/common/utils/regex/RegexUtils.java
View file @
5c4ceb2e
...
...
@@ -10,7 +10,8 @@ import java.util.regex.Pattern;
*/
public
final
class
RegexUtils
{
private
static
Pattern
mobile
=
Pattern
.
compile
(
"^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$"
);
// private static Pattern mobile = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$");
private
static
Pattern
mobile
=
Pattern
.
compile
(
"(\\+\\d+)?1[345678]\\d{9}$"
);
private
static
Pattern
chinese
=
Pattern
.
compile
(
"[\u4e00-\u9fa5]"
);
...
...
@@ -110,4 +111,8 @@ public final class RegexUtils {
return
m
.
find
();
}
public
static
void
main
(
String
[]
args
)
{
boolean
mobileNO
=
isMobileNO
(
"16603042204"
);
System
.
out
.
println
(
mobileNO
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment