- Introduction
- License
- History
- Compilation & Hosting
- Configuration File
- Modules:
- FAQ
- Links
- Credits
|
Declaration:
-
function regexp_match_all(const pattern, str: string; var matches: RegexpResult): longword;
Arguments:
-
pattern |
Regular expression pattern |
str |
Input string |
matches |
Handle to store the result entries |
Description:
-
This function performs global (including all fullmask matches) pattern match on string.
Returns:
-
Number of fullmask entries or 0 on error.
Usage:
-
if regexp_match_all('/foo/i', s, rr) > 0 then
begin
// Working with result
for i := 0 to regexp_count_all(rr) - 1 do
begin
// Working with single entry
re := regexp_entry(rr, i);
for j := 0 to regexp_entry_count(re) - 1 do writeln(regexp_entry_item(re, j));
regexp_free(re);
end;
end;
regexp_free_all(rr);
See also:
-
regexp_match.
|