In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you "what do regular expressions [\ s\ S] * and [\ w\ W] * mean". The content is easy to understand and clear, hoping to help you solve your doubts. Let the editor lead you to study and learn what regular expressions [\ s\ S] * and [\ w] * mean ".
Q:
For example, [amurz] represents any one from a to z.
Isn't that right? Who can explain to me all the uses of []? Thank you.
A:
It means full wildcard, and\ s refers to white space, including spaces, line breaks, tab indentation, etc., while\ s is just the opposite.
Such a positive and negative, it means that all the characters, complete, word-for-word.
In addition, the symbol [] indicates that the individual characters contained in it appear in any order, such as the following rule:
[ace] *
This means that whenever the three arbitrary letters a/c/e appear, they will be matched.
[\ s] indicates that whenever there is a blank, it will match.
[\ s] indicates that if it is not blank, it will match.
\ w matches any word characters that include underscores. Equivalent to "[A-Za-z0-9]".
\ W matches any non-word characters. Equivalent to "[^ A-Za-z0-9]".
Then their combination means that all of them match, and the corresponding ones are [\ w\ W], etc., which have exactly the same meaning.
Another point to say is why there is a "." This wildcard should be used in this way.
In fact, the usage of [\ s\ S] is compared with that of [\ w\ W]. There are more matches, because "." Line breaks are not matched, and people are used to using full wildcard modes such as [\ s\ S] or [\ w\ W] when there is a newline match.
The above is all the contents of the article "what do regular expressions [\ s\ S] * and [\ w] * mean?" 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.