PregQuote

From SCAR Divi Manual
Revision as of 15:22, 26 November 2012 by Freddy (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

function PregQuote(const Str: string): string;

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