IsUnicode (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:IsUnicode subtitle}}
{{Template:Regex:IsUnicode subtitle}}


This page is [[under construction]].
This method indicates whether or not the regular expression used to create the <var>Regex</var> object was specified in Unicode.
==Syntax==
==Syntax==
{{Template:Regex:IsUnicode syntax}}
{{Template:Regex:IsUnicode syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%boolean</th><td><var>Boolean</var> value</td></tr>
<tr><th>%boolean</th><td><var>Boolean</var> value that indicates whether (<var>true</var>) or not (<var>false</var>) the regular expression used to constuct the <var>Regex</var> object was Unicode.</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==
==Examples==
==Examples==
The following example:
<p class="code">b
%regex    is object regex
%regex = new("(((Tomorrow|Today) is)|(Yesterday was)) Pie Day", options="i")
print %regex:isUnicode
%regex = new("((Tomorrow|Today) is)|(Yesterday was) &amp;pi; Day":u, options="i")
print %regex:isUnicode
end
</p>
displays:
<p class="code">False
True
</p>
==See also==
==See also==
{{Template:Regex:IsUnicode footer}}
{{Template:Regex:IsUnicode footer}}
[[Category:Regular expression processing]]

Latest revision as of 02:15, 14 March 2022

Is this a Unicode regular expression (Regex class)


This method indicates whether or not the regular expression used to create the Regex object was specified in Unicode.

Syntax

%boolean = regex:IsUnicode

Syntax terms

%booleanBoolean value that indicates whether (true) or not (false) the regular expression used to constuct the Regex object was Unicode.
regex The Regex object

Examples

The following example:

b %regex is object regex %regex = new("(((Tomorrow|Today) is)|(Yesterday was)) Pie Day", options="i") print %regex:isUnicode %regex = new("((Tomorrow|Today) is)|(Yesterday was) &pi; Day":u, options="i") print %regex:isUnicode end

displays:

False True

See also