In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
When using the grep command, we may use the regular expression of {} to search for the number of times that keywords in front of parentheses are displayed in the text. The common ones are:\ {n\} match the preceding characters n times,\ {n\} match the preceding characters at least n times, match the previous characters n times, through the above three expressions, we can understand The purpose of using {} is to make the preceding characters appear n times, n times or more, and nMum times. If we need to match two of the preceding characters, one of which is a fixed character, we will output the following: [root@hpf-linux 22] # alias egrep='egrep-- color'
The output through the color is obviously the same as we require, but we need to match the previous two characters, both of which need to be matched multiple times, so which two characters need to be enclosed with (). If we only add the () character instead of adding a fixed character, the following phenomenon will occur:
Obviously, if there is no fixed character, the matching character will be matched to a multiple of the bracketed number. If you want to add a fixed character, the above phenomenon will not occur. For more information, please see below:
If there are many of the above, I will not list all the children's shoes I am interested in. I am not very clear about the above questions. If you have any children's shoes that you know, please guide me. Thank you very much!
Therefore, in the future, if we do not add fixed characters when we match and search for many times, there will be a certain deviation with the output we want. I hope that in the future work, it is best to bring fixed characters to match many times to avoid unnecessary trouble!
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.