Resin 1.1
FAQ
Reference
JavaDoc
Demo
Java Tutorial
Getting Started
Configuration
Topics
JSP
XTP/XSL
JavaScript
JS Library
Core Library
File Library
Servlet Library
Database Library
XML Library
Global
Object
Array
Boolean
Date
Function
Math
Number
Regexp
String
Regular Expression Object
RegExp object
input $_ | Default string to match.
lastMatch $& | Last matched characters.
lastParen $+ | Last substring match.
leftContext $` | The string before the match.
rightContext $' | The string after the match.
$1, ..., $9 | Substring matches.
RegExp(pattern [, flags]) | Compiles a regular expression.
Regexp Instance Properties
global | True if the regexp had the /g flag.
ignoreCase | True if the regexp ignores case, i.e. it had the /i flag.
lastIndex | Index into the string telling where to start the next match.
source | The regexp source.
compile(pattern [, flags]) | Recompiles the regular expression.
exec([string]) | Returns an array of the substring matches and sets the regexp and RegExp object variables.
(string) | Same as `exec(string)`.
test(string) | True if string matches the regular expression.
RegExp object
### input $_ | ### JavaScript 1.2
Default string to match.
### lastMatch $& | ### JavaScript 1.2
Last matched characters.
### lastParen $+ | ### JavaScript 1.2
Last substring match.
### leftContext $` | ### JavaScript 1.2
The string before the match.
### rightContext $' | ### JavaScript 1.2
The string after the match.
### $1, ..., $9 | ### JavaScript 1.2
Substring matches.
### RegExp(pattern [, flags]) | ### JavaScript 1.2
Compiles a regular expression.
Regexp Instance Properties
### global | ### JavaScript 1.2
True if the regexp had the /g flag.
### ignoreCase | ### JavaScript 1.2
True if the regexp ignores case, i.e. it had the /i flag.
### lastIndex | ### JavaScript 1.2
Index into the string telling where to start the next match.
### source | ### JavaScript 1.2
The regexp source.
### compile(pattern [, flags]) | ### JavaScript 1.2
Recompiles the regular expression.
### exec([string])
Returns an array of the substring matches and sets the regexp and RegExp object variables. `exec` returns null if the regexp does not match. The first element in the array is the entire match. The returned array sets the property `index` to the index of the match and sets `input` to the tested string. If string is missing, `exec` uses the value of `RegExp.input`.
a = /a(.)c/g; foo = a.exec("left_axc_right");
foo.join() axc,x foo.index 5 foo.input left_axc_right a.lastIndex 8 RegExp.lastMatch axc RegExp.lastParen x RegExp.leftContext left_ RegExp.rightContext _right RegExp.$1 x RegExp.$2 ""
### (string) | ### JavaScript 1.2
Same as `exec(string)`.
### test(string) | ### JavaScript 1.2
True if string matches the regular expression. `test` does not set any variables.
Number |  | String
Copyright © 1998-2000 Caucho Technology. All rights reserved. Last modified: Thu, 16 Sep 1999 14:56:48 -0700 (PDT)