@@ -62,12 +62,12 @@ Regex::~Regex() {
6262}
6363
6464
65- std::list<SMatch > Regex::searchAll (const std::string& s) const {
65+ std::list<RegexMatch > Regex::searchAll (const std::string& s) const {
6666 const char *subject = s.c_str ();
6767 const std::string tmpString = std::string (s.c_str (), s.size ());
6868 int ovector[OVECCOUNT];
6969 int rc, i, offset = 0 ;
70- std::list<SMatch > retList;
70+ std::list<RegexMatch > retList;
7171
7272 do {
7373 rc = pcre_exec (m_pc, m_pce, subject,
@@ -83,7 +83,7 @@ std::list<SMatch> Regex::searchAll(const std::string& s) const {
8383 }
8484 std::string match = std::string (tmpString, start, len);
8585 offset = start + len;
86- retList.push_front (SMatch (match, start));
86+ retList.push_front (RegexMatch (match, start));
8787
8888 if (len == 0 ) {
8989 rc = 0 ;
@@ -95,7 +95,7 @@ std::list<SMatch> Regex::searchAll(const std::string& s) const {
9595 return retList;
9696}
9797
98- bool Regex::searchOneMatch (const std::string& s, std::vector<SMatchCapture >& captures) const {
98+ bool Regex::searchOneMatch (const std::string& s, std::vector<RegexMatchCapture >& captures) const {
9999 const char *subject = s.c_str ();
100100 int ovector[OVECCOUNT];
101101
@@ -108,20 +108,20 @@ bool Regex::searchOneMatch(const std::string& s, std::vector<SMatchCapture>& cap
108108 if (end > s.size ()) {
109109 continue ;
110110 }
111- SMatchCapture capture (i, start, len);
111+ RegexMatchCapture capture (i, start, len);
112112 captures.push_back (capture);
113113 }
114114
115115 return (rc > 0 );
116116}
117117
118- int Regex::search (const std::string& s, SMatch *match) const {
118+ int Regex::search (const std::string& s, RegexMatch *match) const {
119119 int ovector[OVECCOUNT];
120120 int ret = pcre_exec (m_pc, m_pce, s.c_str (),
121121 s.size (), 0 , 0 , ovector, OVECCOUNT) > 0 ;
122122
123123 if (ret > 0 ) {
124- *match = SMatch (
124+ *match = RegexMatch (
125125 std::string (s, ovector[ret-1 ], ovector[ret] - ovector[ret-1 ]),
126126 0 );
127127 }
0 commit comments