- Introduction
- License
- History
- Compilation & Hosting
- Configuration File
- Modules:
- FAQ
- Links
- Credits
|
Declaration:
-
function regexp_replace(const pattern, replacement, str: string): string;
Arguments:
-
pattern |
Regular expression pattern |
replacement |
Replacement string |
str |
Input string |
Description:
-
Replaces all pattern entries with replacement string. You can use submask values in replacement string using $n sequence, where n is submask index. $0 is fullmask entry.
Returns:
-
Replacement result or original string if there were no entries.
Usage:
-
s := regexp_replace('/(.*?foo)bar/i', '$1d', 'junk foobar');
|