In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the regular expressions (parentheses), [braces], {curly braces} what are the differences, have a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
The () [] {} of a regular expression has different meanings.
() is to extract the matching string. If there are several () in the expression, there are several matching strings.
(\ s*) A string that represents consecutive spaces.
[] is the range of characters that define a match. For example, [a-zA-Z0-9] means that the characters in the corresponding position should match English characters and numbers. [\ s*] indicates a space or a * sign.
{} is generally used to indicate the length of a match, for example,\ s {3} means to match three spaces, and\ s [1pr 3] means to match one to three spaces.
(0-9) match'0-9 'itself. [0-9] * matching numbers (note that there is a *, which can be empty) [0-9] + matching numbers (note that there is a + after it, which cannot be empty) {1-9} spelling error.
[0-9] {0jue 9} represents a numeric string of length from 0 to 9.
For example: filter content in PHP with numbers or spaces in it
Preg_replace ("/\ d {1,}\ s {0jue 1} /", "xxxxxxxx", $signaturecontent); Thank you for reading this article carefully. I hope the article "what are the differences between regular expressions (parentheses), [braces] and {curly braces}" shared by the editor will be helpful to you. At the same time, I hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.