In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
The main content of this article is "can C++ use regular expressions?", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "can C++ use regular expressions?"
The answer must be yes, so today a simple input scanf takes you into the regular world.
# include
Int main ()
{
Printf ("input digate:")
Char str [100]
Scanf ("% [0-9]", str); / / enter 123456abc
Printf ("% s", str); / / print 123456
}
Enter any string of characters that start with a number in scanf, and only the first string of numbers in the character will be saved in str.
Input digate:123456abc
123456
First, give some simple rules.
Qualifier meaning% [0-9] numeric collection% [^ 0-9] non-numeric collection% [a-zA-Z] letter set% [^ a-zA-Z] non-alphanumeric set
Preheat up, let's get down to business.
To determine whether an input QQ number is valid, how to determine?
Judgment steps:
The length is greater than 5, less than or equal to 11; the first bit cannot be 0; is it a pure number? C++string processing: # include
Using namespace std
Int main ()
{
String qq = "7466a2063"
If (qq.length () > = 5 & & qq.length ()
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.