C# Класс Jurassic.Library.RegExpInstance

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CalculateStartPosition int
Compile void
CreatePrototype ObjectInstance
Exec object
GetDeclarativeProperties List
ParseFlags RegexOptions
RegExpInstance System
RegExpInstance System
Test bool
ToString string
__GETTER__Flags object
__GETTER__Global object
__GETTER__IgnoreCase object
__GETTER__Multiline object
__GETTER__Source object
__STUB__Compile object
__STUB__Exec object
__STUB__Test object
__STUB__ToString object

Открытые методы

Метод Описание
Match ( string input ) : object

Finds all regular expression matches within the given string.

Replace ( string input, FunctionInstance replaceFunction ) : string

Returns a copy of the given string with text replaced using a regular expression.

Replace ( string input, string replaceText ) : string

Returns a copy of the given string with text replaced using a regular expression.

Search ( string input ) : int

Returns the position of the first substring match in a regular expression search.

Split ( string input, uint limit = uint.MaxValue ) : ArrayInstance

Splits the given string into an array of strings by separating the string into substrings.

Приватные методы

Метод Описание
CalculateStartPosition ( string input ) : int

Calculates the position to start searching.

Compile ( string pattern, string flags = null ) : void
CreatePrototype ( ScriptEngine engine, RegExpConstructor constructor ) : ObjectInstance

Creates the RegExp prototype object.

Exec ( string input ) : object
GetDeclarativeProperties ( ScriptEngine engine ) : List
ParseFlags ( string flags ) : RegexOptions

Parses the flags parameter into an enum.

RegExpInstance ( ObjectInstance prototype, RegExpInstance existingInstance ) : System

Creates a new regular expression instance by copying the pattern and flags from another RegExp instance.

RegExpInstance ( ObjectInstance prototype, string pattern, string flags = null ) : System

Creates a new regular expression instance.

Test ( string input ) : bool
ToString ( ) : string
__GETTER__Flags ( ScriptEngine engine, object thisObj, object args ) : object
__GETTER__Global ( ScriptEngine engine, object thisObj, object args ) : object
__GETTER__IgnoreCase ( ScriptEngine engine, object thisObj, object args ) : object
__GETTER__Multiline ( ScriptEngine engine, object thisObj, object args ) : object
__GETTER__Source ( ScriptEngine engine, object thisObj, object args ) : object
__STUB__Compile ( ScriptEngine engine, object thisObj, object args ) : object
__STUB__Exec ( ScriptEngine engine, object thisObj, object args ) : object
__STUB__Test ( ScriptEngine engine, object thisObj, object args ) : object
__STUB__ToString ( ScriptEngine engine, object thisObj, object args ) : object

Описание методов

Match() публичный Метод

Finds all regular expression matches within the given string.
public Match ( string input ) : object
input string The string on which to perform the search.
Результат object

Replace() публичный Метод

Returns a copy of the given string with text replaced using a regular expression.
public Replace ( string input, FunctionInstance replaceFunction ) : string
input string The string on which to perform the search.
replaceFunction FunctionInstance A function that is called to produce the text to replace /// for every successful match.
Результат string

Replace() публичный Метод

Returns a copy of the given string with text replaced using a regular expression.
public Replace ( string input, string replaceText ) : string
input string The string on which to perform the search.
replaceText string A string containing the text to replace for every successful match.
Результат string

Search() публичный Метод

Returns the position of the first substring match in a regular expression search.
public Search ( string input ) : int
input string The string on which to perform the search.
Результат int

Split() публичный Метод

Splits the given string into an array of strings by separating the string into substrings.
public Split ( string input, uint limit = uint.MaxValue ) : ArrayInstance
input string The string to split.
limit uint The maximum number of array items to return. Defaults to unlimited.
Результат ArrayInstance