Difference between revisions of "PregQuote"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function PregQuote(const Str: AnsiString): AnsiString; </source> ==Availability== SCAR Divi 3.25 > Current ==Description== Esc...") |
(No difference)
|
Revision as of 09:25, 2 July 2011
Definition
function PregQuote(const Str: AnsiString): AnsiString;
Availability
SCAR Divi 3.25 > Current
Description
Escapes all characters that are part of the regular expression syntax in a given string Str. The function is modeled after the equivalent which is available in PHP.
Example
begin WriteLn(PregQuote('--[Hello World!]--')); end.
Output:
\-\-\[Hello World\!\]\-\-