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


This page is [[under construction]].
This method returns the <var>Options</var> value specified in the [[New (Regex constructor)|Regex constructor]] call.
==Syntax==
==Syntax==
{{Template:Regex:Options syntax}}
{{Template:Regex:Options syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%string</th><td>string</td></tr>
<tr><th>%string</th><td>The <var>Options</var> value specified in the <var>Regex</var> constructor call. If no options were specified, a zer-length string is returned.</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>The returned value is always in upper case with no blanks between options, regardless of casing and spacing used in the constructor call.</li>
</ul>
==Examples==
==Examples==
The following example:
<p class="code">b
%regex    is object regex
%regex = new("([a-z]{3,}\d{3,})", options="is")
print %regex:options
end
</p>
displays:
<p class="code">IS
</p>
==See also==
==See also==
{{Template:Regex:Options footer}}
{{Template:Regex:Options footer}}
[[Category:Regular expression processing]]

Latest revision as of 18:12, 23 March 2022

Regular expression options (Regex class)


This method returns the Options value specified in the Regex constructor call.

Syntax

%string = regex:Options

Syntax terms

%stringThe Options value specified in the Regex constructor call. If no options were specified, a zer-length string is returned.
regex The Regex object.

Usage notes

  • The returned value is always in upper case with no blanks between options, regardless of casing and spacing used in the constructor call.

Examples

The following example:

b %regex is object regex %regex = new("([a-z]{3,}\d{3,})", options="is") print %regex:options end

displays:

IS

See also