Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does java match a user's password with regular expressions

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to use regular expressions to match users' passwords with java". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how java uses regular expressions to match user passwords".

The password form can be set according to the development requirements. Here are several examples of matching passwords:

Regular expression ^ [a-zA-Z]\ w {5pm 17} $

The match starts with a letter, is between 6 and 18 in length, and can only contain characters, numbers, and underscores

Mismatch

The regular expression ^ (? =. *\ d) (? =. * [a murz]) (? =. * [Amurz]) (?!. *\ s). {4jue 8} $

Match 1agdA*$# | 1agdA*$# | 1agdA*$#

Does not match wyrn%@*&$# f | mbndkfh782 | BNfhjdhfjd&*)% # $)

Regular expression [^ A-Za-z0-9]

Match! @ # $|% ^ & * |'>

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report