In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.