-
Notifications
You must be signed in to change notification settings - Fork 0
API Host ScriptRegex
Liu.Yandong.Hanks edited this page Aug 21, 2026
·
3 revisions
Script regular expression wrapper over System.Text.RegularExpressions.Regex.
Namespace: AuroraScript.Runtime.Types. Kind: class.
Back to .NET Host API Reference
Script regular expression wrapper over System.Text.RegularExpressions.Regex.
A minimal use of ScriptRegex.
var regex = new ScriptRegex(
new Regex("^\\d+$"),
"");
var matched = regex.Test(ScriptDatum.FromString("42"));
Console.WriteLine(matched); // TrueCreates a ScriptRegex instance.
ScriptRegex(Regex regex, string flags)Parameters
| Name | Type | Required | Description |
|---|---|---|---|
regex |
Regex |
Yes | CLR regular expression to wrap. |
flags |
string |
Yes | Regular-expression flags. |
Returns
A new ScriptRegex instance.
bool Test(ScriptDatum value)Parameters
| Name | Type | Required | Description |
|---|---|---|---|
value |
ScriptDatum |
Yes | Script value converted to text and tested against the regular expression. |
Returns
Returns bool.
ScriptObject Match(StringValue str)Parameters
| Name | Type | Required | Description |
|---|---|---|---|
str |
StringValue |
Yes | The StringValue parameter required by the signature. |
Returns
Returns ScriptObject.
ScriptObject MatchOfGlobal(StringValue str)Parameters
| Name | Type | Required | Description |
|---|---|---|---|
str |
StringValue |
Yes | The StringValue parameter required by the signature. |
Returns
Returns ScriptObject.
ScriptArray MatchAll(StringValue str)Parameters
| Name | Type | Required | Description |
|---|---|---|---|
str |
StringValue |
Yes | The StringValue parameter required by the signature. |
Returns
Returns ScriptArray.
bool HasFlag(string flag)Parameters
| Name | Type | Required | Description |
|---|---|---|---|
flag |
string |
Yes | Flag to inspect or apply. |
Returns
Returns bool.
AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License