ReplaceUnicode (Regex property)

From m204wiki
Jump to navigation Jump to search

String regular expression (Regex class)


This method returns the replacement unicode value specified in the Regex constructor call.

Syntax

%unicode = regex:ReplaceUnicode

Syntax terms

%stringThe replacement unicode value specified in the Regex constructor call.
regex The Regex object.

Usage notes

  • If the regular expresion specified in the constructor call was not Unicode, this method causes request cancellation. To test if a Regex object was created with a Unicode regular expression check the IsUnicode property.
  • If no replacement unicode value was specified in the constructor call, a zero-length unicode value is returned.

Examples

The following example:

b %regex is object regex %regex = new("([α-ω]{3,})(\d{3,})":u, replace="$2–$1":u) print %regex:replaceString end

displays:

$2–$1

See also