C# Class Jurassic.Library.RegExpInstance

ファイルを表示 Open project: paulbartrum/jurassic Class Usage Examples

Private Properties

Property Type Description
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

Public Methods

Method Description
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.

Private Methods

Method Description
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

Method Details

Match() public method

Finds all regular expression matches within the given string.
public Match ( string input ) : object
input string The string on which to perform the search.
return object

Replace() public method

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.
return string

Replace() public method

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.
return string

Search() public method

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.
return int

Split() public method

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.
return ArrayInstance