In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you the "example analysis of Abba reverse forward regular matching in js", which is easy to understand and well organized. I hope it can help you solve your doubts. Let me lead you to study and learn this article "example analysis of Abba reverse forward regular matching in js".
Core code:
Var S1 = 'acritan';var S2 =' bassarisk';var S3 = 'commotive';// find the words var r = / ^ (?!. *? (.) (.)\ 2\ 1) / r.test (S1); / truealert (r.test (S2)); / / falsealert (r.test (S2)); / / false
Zero width assertion (?! exp)
Anti-antecedent assertion
What is an anti-antecedent assertion? using (?! exp) matching is not followed by exp.
Php instance:
I mainly want to tell you about the role of this rule through an example.
$str= "abcgwcab"; $parent='/bc (?! ww) gw/';$str=preg_match ($parent,$str,$match); var_dump ($str); var_dump ($match); / * * output: int 1array (size=1) 0 = > string 'bcgw' (length=4) * /
Parsing: first determine whether the string contains bc, then determine that it is not followed by ww, and finally match gw. You can see that before and after the reverse assertion, you can add other matching conditions.
. *?
This. * is to match any length of non-empty characters. That is, the non-greedy pattern is to match the fewest characters, such as one character.
The above is all the content of the article "sample Analysis of Abba reverse forward-looking regular matching in js". 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.