cppassist  1.0.0.f4fab4f962ff
C++ sanctuary for small but powerful and frequently required, stand alone features.
regex.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 
5 #include <string>
6 #include <vector>
7 
8 #include <cppassist/cppassist_api.h>
9 
10 
11 namespace cppassist
12 {
13 namespace string
14 {
15 
16 
29 CPPASSIST_API bool matchesRegex(const std::string & string, const std::string & regex);
30 
43 CPPASSIST_API std::vector<std::string> extract(const std::string & string, const std::string & regex);
44 
61 CPPASSIST_API std::string::const_iterator extractNext(std::string::const_iterator begin, std::string::const_iterator end, const std::string & regex, std::string & match);
62 
79 CPPASSIST_API const char * extractNext(const char * begin, const char * end, const std::string & regex, std::string & match);
80 
81 
82 } // namespace string
83 } // namespace cppassist
Definition: ArgumentParser.h:12
CPPASSIST_API bool matchesRegex(const std::string &string, const std::string &regex)
Check if a regex matches a given string.
CPPASSIST_API std::string::const_iterator extractNext(std::string::const_iterator begin, std::string::const_iterator end, const std::string &regex, std::string &match)
Extract next string matched by a regex.
CPPASSIST_API std::vector< std::string > extract(const std::string &string, const std::string &regex)
Extract substrings matched by a regex.