Interface JSRegExpFunctions
-
- All Superinterfaces:
JSObjectFunctions
- All Known Implementing Classes:
JSRegExp
public interface JSRegExpFunctions extends JSObjectFunctions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JSArrayexec(java.lang.String string)function exec(string) general purpose pattern matching.JSBooleantest(java.lang.String string)function test(string) test whether a string matches a pattern.-
Methods inherited from interface org.fife.rsta.ac.js.ecma.api.ecma3.functions.JSObjectFunctions
hasOwnProperty, isPrototypeOf, propertyIsEnumerable, toLocaleString, toString, valueOf
-
-
-
-
Method Detail
-
exec
JSArray exec(java.lang.String string)
function exec(string) general purpose pattern matching.Example
var r = new RegExp("/\bJava\w*\b/g"); var text = "JavaScript is not the same as Java"; while((result = e.exec(text)) != null) { alert("Matched: " + result[0]); }
-
test
JSBoolean test(java.lang.String string)
function test(string) test whether a string matches a pattern.Example
var r = new RegExp("/java/i"); r.test("JavaScript"); //returns true r.test("ECMAScript"); //returns false
-
-