11#include <OpenMS/config.h>
19 struct RegularExpressionAccess;
20 struct RegularExpressionMatch;
43 void assign(
const std::string& pattern);
45 std::string
str()
const;
49 bool search(
const std::string& text, std::string* first_match =
nullptr)
const;
53 std::shared_ptr<const Impl>
impl_;
54 friend struct Internal::RegularExpressionAccess;
Compiled Perl-compatible regular expression, including named capture groups.
Definition RegularExpression.h:30
bool search(const std::string &text, std::string *first_match=nullptr) const
Search text, optionally returning the first complete match.
bool empty() const
True only if no pattern was set; a compiled "" is not empty.
void assign(const std::string &pattern)
Replaces the expression by pattern; copies made earlier keep the old one.
std::shared_ptr< const Impl > impl_
Definition RegularExpression.h:53
RegularExpression()
Default constructor: holds no pattern (empty() is true) and matches like the pattern "".
RegularExpression(const std::string &pattern)
Compiles pattern (Perl syntax)
std::string str() const
The pattern this expression was compiled from; "" if it holds none.
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19