RegexUnicode (Regex property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
No edit summary
Line 1: Line 1:
{{Template:Regex:RegexUnicode subtitle}}
{{Template:Regex:RegexUnicode subtitle}}


This page is [[under construction]].
This method returns the regex Unicode value specified in the [[New (Regex constructor)|Regex constructor]] call.
==Syntax==
==Syntax==
{{Template:Regex:RegexUnicode syntax}}
{{Template:Regex:RegexUnicode syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%unicode</th><td>Unicode</td></tr>
<tr><th>%unicode</th><td>The regex unicode value specified in the Regex constructor call.</td></tr>
<tr><th>regex</th>
<tr><th>regex</th>
<td><var>Regex</var> object</td></tr>
<td>The <var>Regex</var> object.</td></tr>
</table>
</table>
==Usage notes==
==Usage notes==
<ul>
<li>If the regular expresion specified in the constructor call was not Unicode, this method causes request cancellation. To test if a <var>Regex</var> object was created with a Unicode regular expression check the [[IsUnicode (Regex property)|IsUnicode property]].</li>
</ul>
==Examples==
==Examples==
The following example:
<p class="code">b
%regex    is object regex
%regex = new("([&amp;alpha;-&amp;omega;]{3,}\d{3,})":u, options="is")
print %regex:regexUnicode
end
</p>
displays:
<p class="code">([&amp;#x03B1;-&amp;#x03C9;]{3,}\d{3,})
</p>
==See also==
==See also==
{{Template:Regex:RegexUnicode footer}}
{{Template:Regex:RegexString footer}}
 
[[Category:Regular expression processing]]

Revision as of 18:28, 23 March 2022

Unicode regular expression (Regex class)


This method returns the regex Unicode value specified in the Regex constructor call.

Syntax

%unicode = regex:RegexUnicode

Syntax terms

%unicodeThe regex 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.

Examples

The following example:

b %regex is object regex %regex = new("([&alpha;-&omega;]{3,}\d{3,})":u, options="is") print %regex:regexUnicode end

displays:

([&#x03B1;-&#x03C9;]{3,}\d{3,})

See also