Copy (Regex function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Template:Regex:Copy subtitle}}
{{Template:Regex:Copy subtitle}}


This method makes a copy of the <var>Regex</var> object.
This method makes a copy of the <var>Regex</var> object.
 
This method is idenctial to [[DeepCopy (Regex function)|DeepCopy]].
==Syntax==
==Syntax==
{{Template:Regex:Copy syntax}}
{{Template:Regex:Copy syntax}}

Revision as of 22:22, 13 March 2022

Return a copy of a Regex object (Regex class)


This method makes a copy of the Regex object.

This method is idenctial to DeepCopy.

Syntax

%outRegex = regex:Copy

Syntax terms

%outRegexA new Regex object
regex Regex object, which may be Null

Examples

The following make a copy of a Regex object and then uses it to do a match:

%regex is object regex %regex2 is object regex %str is longstring ... %regex2 = %regex:copy if %regex2:match(%str) then ... end if

See also