OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

org.ecmascript.object
Class RegExp

org.ecmascript.object.Object
   |
   +--org.ecmascript.object.RegExp

public class RegExp
extends Object
The native browser JavaScript object used to work with regular expressions.
An instance can also be created with the shorthand /pattern/attributes.

Note that this object is implemented and supported by the web browser and results of its use may vary.


See also:
String.match(RegExp)
String.replace(RegExp, String)
String.search(RegExp)
String.split(RegExp, Number)

Field Summary

public Boolean
global
Describes whether the "g" attribute is applied to this regular expression.
public Boolean
ignoreCase
Describes whether the "i" attribute is applied to this regular expression.
public String
input
The text that the patter is matched against.
public Number
lastIndex
The index at which the next index will be performed from.
public String
lastMatch
The recently-found match.
public String
lastParen
The recently-found parenthesized match.
public String
leftContext
The text before the recently-found match.
public Boolean
multiline
Describes whether the "m" attribute is applied to this regular expression.
public String
rightContext
The text after the recently-found match.
public String
source
The the regular expression pattern.


Fields inherited from org.ecmascript.object.Object

constructor, prototype


Constructor Summary

public
RegExp(String pattern, String attributes)
The native browser JavaScript object used to work with regular expressions.


Method Summary

public void
compile(String pattern)
Updates the pattern of this regular expression.
public String
exec(String input)
Searches the input string for a match.
public Boolean
test(String input)
Determines whether the input string has a match.


Field Detail


global

public Boolean global

Describes whether the "g" attribute is applied to this regular expression. If applied, all matches will be found; not stopping after finding the first match.

ignoreCase

public Boolean ignoreCase

Describes whether the "i" attribute is applied to this regular expression. If applied, matches will be made in a case-insensitive manner.

input

public String input

The text that the patter is matched against.

lastIndex

public Number lastIndex

The index at which the next index will be performed from.

lastMatch

public String lastMatch

The recently-found match.

lastParen

public String lastParen

The recently-found parenthesized match.

leftContext

public String leftContext

The text before the recently-found match.

multiline

public Boolean multiline

Describes whether the "m" attribute is applied to this regular expression. If applied, matches will be made across multiple lines.

rightContext

public String rightContext

The text after the recently-found match.

source

public String source

The the regular expression pattern.

Constructor Detail


RegExp

public RegExp(String pattern,
              String attributes)

The native browser JavaScript object used to work with regular expressions.
An instance can also be created with the shorthand /pattern/attributes.

Note that this object is implemented and supported by the web browser and results of its use may vary.

Parameters:
pattern  -  the regular expression pattern
attributes  -  the regular expression attributes; use "g" for global, "i" for ignore case, and "m" for multi-line

Method Detail


compile

public void compile(String pattern)

Updates the pattern of this regular expression.

Parameters:
pattern  -  the new pattern
Return:
void - null

exec

public String exec(String input)

Searches the input string for a match.

Parameters:
input  -  the String to search
Return:
String - the matched text or null if not found

test

public Boolean test(String input)

Determines whether the input string has a match.

Parameters:
input  -  the String to search
Return:
Boolean - null true if the match was found, false if not found

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2011.04.05 23:36 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.