17 |
|
pcre_fullinfo(expression, NULL, PCRE_INFO_CAPTURECOUNT, &length); |
18 |
|
|
19 |
|
int* substrings(new int[(++length *= 3)]); |
20 |
< |
int count(pcre_exec(expression, NULL, stuff.NullTerminate(), |
21 |
< |
stuff.GetData().GetSize(), 0, 0, substrings, length)); |
20 |
> |
int count(pcre_exec(expression, NULL, stuff.NullTerminate(), stuff.GetData().GetSize(), 0, 0, substrings, length)); |
21 |
|
|
22 |
|
if (count > 0) |
23 |
|
{ |
25 |
|
|
26 |
|
for (int index(0); index < count; ++index) |
27 |
|
{ |
28 |
< |
pcre_copy_substring(stuff.NullTerminate(), substrings, count, |
30 |
< |
index, substring, stuff.GetData().GetSize() + 1); |
28 |
> |
pcre_copy_substring(stuff.NullTerminate(), substrings, count, index, substring, stuff.GetData().GetSize() + 1); |
29 |
|
|
30 |
|
this->substrings.InsertLast(substring); |
31 |
|
} |
51 |
|
const char* error; |
52 |
|
int offset; |
53 |
|
|
54 |
< |
this->expression = pcre_compile(expression.NullTerminate(), PCRE_MULTILINE, |
57 |
< |
&error, &offset, NULL); |
54 |
> |
this->expression = pcre_compile(expression.NullTerminate(), PCRE_MULTILINE, &error, &offset, NULL); |
55 |
|
|
56 |
|
return *this; |
57 |
|
} |