@@ -66,12 +66,12 @@ Regex::~Regex() {
66
66
}
67
67
68
68
69
- std::list<SMatch > Regex::searchAll (const std::string& s) const {
69
+ std::list<RegexMatch > Regex::searchAll (const std::string& s) const {
70
70
const char *subject = s.c_str ();
71
71
const std::string tmpString = std::string (s.c_str (), s.size ());
72
72
int ovector[OVECCOUNT];
73
73
int rc, i, offset = 0 ;
74
- std::list<SMatch > retList;
74
+ std::list<RegexMatch > retList;
75
75
76
76
do {
77
77
rc = pcre_exec (m_pc, m_pce, subject,
@@ -87,7 +87,7 @@ std::list<SMatch> Regex::searchAll(const std::string& s) const {
87
87
}
88
88
std::string match = std::string (tmpString, start, len);
89
89
offset = start + len;
90
- retList.push_front (SMatch (match, start));
90
+ retList.push_front (RegexMatch (match, start));
91
91
92
92
if (len == 0 ) {
93
93
rc = 0 ;
@@ -99,13 +99,13 @@ std::list<SMatch> Regex::searchAll(const std::string& s) const {
99
99
return retList;
100
100
}
101
101
102
- int Regex::search (const std::string& s, SMatch *match) const {
102
+ int Regex::search (const std::string& s, RegexMatch *match) const {
103
103
int ovector[OVECCOUNT];
104
104
int ret = pcre_exec (m_pc, m_pce, s.c_str (),
105
105
s.size (), 0 , 0 , ovector, OVECCOUNT) > 0 ;
106
106
107
107
if (ret > 0 ) {
108
- *match = SMatch (
108
+ *match = RegexMatch (
109
109
std::string (s, ovector[ret-1 ], ovector[ret] - ovector[ret-1 ]),
110
110
0 );
111
111
}
0 commit comments