Interface JSRegExpFunctions
- All Superinterfaces:
JSObjectFunctions
- All Known Implementing Classes:
JSRegExp
-
Method Summary
Methods inherited from interface org.fife.rsta.ac.js.ecma.api.ecma3.functions.JSObjectFunctions
hasOwnProperty, isPrototypeOf, propertyIsEnumerable, toLocaleString, toString, valueOf
-
Method Details
-
exec
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]); }- Parameters:
string- The string to be searched- Since:
- Standard ECMA-262 3rd. Edition, Level 2 Document Object Model Core Definition.
- See Also:
-
test
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- Parameters:
string- The string to be tested- Since:
- Standard ECMA-262 3rd. Edition, Level 2 Document Object Model Core Definition.
- See Also:
-