In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you the "Scala regular expression problem example analysis", the content is easy to understand, clear, hope to help you solve the doubt, the following let the editor lead you to study and learn "Scala regular expression problem example analysis" this article.
My colleague helped me debug the regular expression problem of the password modification module, and finally I found that the regular expression successfully tuned was as follows:
The regular expression of / / password consists of four types of characters: uppercase letters, lowercase letters, numbers, and underscores, and should contain at least two of them.
Private final val REGEXP_PATTERN = "(? = .*\\ d) (? = .* [Amurz]) | (? = .*\\ d) (? = .* [Amurz]) | (? = .*\\ d) (? = .* _) |" +
"(? =. * [Amurz]) (? =. * [Amurz]) | (? =. * [Amurz]) (? =. * _) | (? =. * [Amurz]) (? =. * _) ^ [\\ da-zA-Z_] {6jue 20} $"
That is to say, it was successful only after changing back to the String expression of java.
The process is very difficult, to replace it with the most basic expression, such as N-digit, tested and found no problem, and then tested each unit in margin, found that there was no problem, and then thought that it was the problem of expression line wrapping, and finally found that it was called after changing to double quotation marks.
At the same time, I found that when the Future type is passed back as the return value of the askTry method, the success should be consistent with the type in square brackets after the askTry, and it doesn't matter if an exception is thrown. In addition, the correct way for git to use is to first commit its own modifications, then git pull origin master, resolve conflicts if there is a conflict, and then git push origin XXX, where XXX is its own branch remotely, and finally request to merge the two on gitlab.
The above is all the content of the article "sample Analysis of Scala regular expression problems". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.