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
cb48a1e1
authored
Nov 28, 2018
by
朱亚东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改密码校验规则,必须包含字母(可以是大写或是小写)和数字
parent
22578fa0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
src/main/java/com/kingboy/common/utils/regex/RegexUtils.java
+1
-1
No files found.
src/main/java/com/kingboy/common/utils/regex/RegexUtils.java
View file @
cb48a1e1
...
...
@@ -120,7 +120,7 @@ public final class RegexUtils {
return
false
;
}
String
pattern
=
"^(?=.*[0-9].*)(?=.*[a-z].*)[A-Za-z0-9]{6,16}$"
;
String
pattern
=
"^(?=.*[0-9].*)(?=.*[
A-Z
a-z].*)[A-Za-z0-9]{6,16}$"
;
Pattern
r
=
Pattern
.
compile
(
pattern
);
Matcher
m
=
r
.
matcher
(
str
);
return
m
.
matches
();
...
...
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