Returns true if the string in the first parameter matches the regular expression in the second parameter. For more information, see this page.
String
matchRegExp(<parameters>)
Parameter | Type |
---|---|
string | string |
regexp | string |
matchRegExp(<string>,<string>)
Returns a true.
matchRegExp("Hello World", "Hello\s+World")
Returns true.
Explanation:
Here you check if the string satisfies the regular expression (java syntax): starts with “Hello”, then any kind of string and finishes with “World”.