In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to use regular expressions in the perl language. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.
A regular expression describes a pattern of string matching, which can be used to check whether a string contains a certain substring, replace a matching substring, or extract a substring from a string that meets a certain condition. Perl language regular expression function is not...
A regular expression describes a pattern of string matching, which can be used to check whether a string contains a certain substring, replace a matching substring, or extract a substring from a string that meets a certain condition.
Perl language regular expressions are very powerful, basically the most powerful in common languages, and many languages refer to Perl regular expressions when designing regular expression support.
Perl has three forms of regular expressions: matching, substitution, and transformation:
Match: m//(also abbreviated as//, omitting m)
Replace: s///
Conversion: tr///
These three forms are generally and =~ or!~ Use together,=~ means match,!~ indicates a mismatch.
Pattern matching has some common modifiers:
i Ignore case in mode
g Global match
Regular expression rules. Matches all characters except newline * Matches the x string zero or more times, but matches the fewest possible times? Matches 0 or 1 x string.* Match any character 0 or more times [] Matches characters [^] within [] Match does not match characters in []^ Matches the character at the beginning of the character $ Matches characters at the end of characters\d Matches a numeric character, same syntax as [0-9]\D Matches a non-numeric character\w Match letters or numbers\W Match non-English letters or numbers\s Spaces, same syntax as [\n\t\r\f]\S Non-blank thanks for reading! About "how to use regular expressions in perl language" this article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!
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.