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(), stuff.GetSize(), 0, 0, substrings, length)); |
20 |
> |
int count(pcre_exec(expression, NULL, stuff.NullTerminate(), |
21 |
> |
stuff.GetData().GetSize(), 0, 0, substrings, length)); |
22 |
|
|
23 |
|
if (count > 0) |
24 |
|
{ |
25 |
< |
char* substring(new char[stuff.length() + 1]); |
25 |
> |
char* substring(new char[stuff.GetData().GetSize() + 1]); |
26 |
|
|
27 |
|
for (int index(0); index < count; ++index) |
28 |
|
{ |
29 |
< |
pcre_copy_substring(stuff.NullTerminate(), substrings, count, index, substring, stuff.GetSize() + 1); |
29 |
> |
pcre_copy_substring(stuff.NullTerminate(), substrings, count, |
30 |
> |
index, substring, stuff.GetData().GetSize() + 1); |
31 |
|
|
32 |
|
this->substrings.push_back(substring); |
33 |
|
} |
52 |
|
const char* error; |
53 |
|
int offset; |
54 |
|
|
55 |
< |
this->expression = pcre_compile(expression.NullTerminate(), 0, &error, &offset, NULL); |
55 |
> |
this->expression = pcre_compile(expression.NullTerminate(), 0, &error, |
56 |
> |
&offset, NULL); |
57 |
|
|
58 |
|
return *this; |
59 |
|
} |