mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 18:42:41 +01:00
Named substring support
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
|
||||
//
|
||||
@@ -91,8 +92,10 @@ public:
|
||||
{
|
||||
std::string::size_type offset; /// zero based offset (std::string::npos if subexpr does not match)
|
||||
std::string::size_type length; /// length of substring
|
||||
std::string name; /// name of group
|
||||
};
|
||||
typedef std::vector<Match> MatchVec;
|
||||
typedef std::map<int, std::string> GroupMap;
|
||||
|
||||
RegularExpression(const std::string& pattern, int options = 0, bool study = true);
|
||||
/// Creates a regular expression and parses the given pattern.
|
||||
@@ -212,6 +215,8 @@ private:
|
||||
pcre* _pcre;
|
||||
pcre_extra* _extra;
|
||||
|
||||
GroupMap _groups;
|
||||
|
||||
static const int OVEC_SIZE;
|
||||
|
||||
RegularExpression();
|
||||
|
||||
Reference in New Issue
Block a user