public class JSRegExp extends JSObject
| Modifier and Type | Class and Description |
|---|---|
class |
JSRegExp.ExecResult
A special JSArray returned by the result of JSRegExp.exec()
See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec
|
JSPropertyAttributeDontDelete, JSPropertyAttributeDontEnum, JSPropertyAttributeNone, JSPropertyAttributeReadOnly| Constructor and Description |
|---|
JSRegExp(JSContext ctx,
java.lang.String pattern)
Creates a new JavaScript regular expression
|
JSRegExp(JSContext ctx,
java.lang.String pattern,
java.lang.String flags)
Creates a new JavaScript regular expression
|
| Modifier and Type | Method and Description |
|---|---|
JSRegExp.ExecResult |
exec(java.lang.String str)
JavaScript RegExp.prototype.exec(), see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec
|
java.lang.Boolean |
global()
Indicates if the "g" flag was used for a global match
|
java.lang.Boolean |
ignoreCase()
Indicates if the "i" flag was used to ignore case
|
java.lang.Integer |
lastIndex()
JavaScript RegExp.prototype.lastIndex
The index at which to start the next match
|
java.lang.Boolean |
multiline()
Indicates if the "m" flag was used to search in strings across multiple lines
|
java.lang.String |
source()
Return the text of the pattern
|
java.lang.Boolean |
test(java.lang.String str)
JavaScript, RegExp.prototype.test(), see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test
|
__nullFunc, callAsFunction, callAsFunction, callAsFunction, callAsFunction, deleteProperty, getThis, hashCode, hasProperty, isConstructor, isFunction, property, property, property, propertyAtIndex, propertyAtIndex, propertyNames, prototype, prototypeequals, getContext, isArray, isBoolean, isDate, isEqual, isInstanceOfConstructor, isNull, isNumber, isObject, isStrictEqual, isString, isUndefined, toBoolean, toFunction, toJSArray, toJSON, toJSON, toNumber, toObject, toString, valueRefpublic JSRegExp(JSContext ctx, java.lang.String pattern, java.lang.String flags) throws JSException
ctx - The context in which to create the regular expressionpattern - The REGEXP patternflags - The REGEXP flagsJSExceptionpublic JSRegExp(JSContext ctx, java.lang.String pattern) throws JSException
ctx - The context in which to create the regular expressionpattern - The REGEXP patternJSExceptionpublic JSRegExp.ExecResult exec(java.lang.String str)
str - The string to matchpublic java.lang.Integer lastIndex()
public java.lang.Boolean ignoreCase()
public java.lang.Boolean global()
public java.lang.Boolean multiline()
public java.lang.String source()
public java.lang.Boolean test(java.lang.String str)
str - The string against which to match the regular expression