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
4c91d92c
authored
Apr 09, 2018
by
fanlongfei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'test'
修改正则 See merge request
!3
parents
fd656597
1cd40236
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/main/java/com/kingboy/common/utils/regex/RegexUtils.java
+6
-2
No files found.
src/main/java/com/kingboy/common/utils/regex/RegexUtils.java
View file @
4c91d92c
...
...
@@ -10,8 +10,8 @@ import java.util.regex.Pattern;
*/
public
final
class
RegexUtils
{
private
static
Pattern
mobile1
=
Pattern
.
compile
(
"^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$"
);
private
static
Pattern
mobile
=
Pattern
.
compile
(
"(\\+\\d+)?1[34578]\\d{9}$"
);
// 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[345
6
78]\\d{9}$"
);
private
static
Pattern
chinese
=
Pattern
.
compile
(
"[\u4e00-\u9fa5]"
);
...
...
@@ -111,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