PregQuote

From SCAR Divi Manual
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