PregQuote

From SCAR Divi Manual
Revision as of 09:25, 2 July 2011 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function PregQuote(const Str: AnsiString): AnsiString; </source> ==Availability== SCAR Divi 3.25 > Current ==Description== Esc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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\!\]\-\-

See Also