$rsearch

Usage: $rsearch(text,pattern)
Category: text

Description:

Regular expression search. This function will return the first matching group specified by pattern from text. For more information about regular expressions, please see the article on Wikipedia.

Example:

The following statements will return the values indicated:

$rsearch(test \(disc 1\),\\\(disc \(\\d+\)\\\))  ==>  "1"
$rsearch(test \(disc 1\),\\\(disc \\d+\\\))      ==>  "(disc 1)"
$rsearch(test,x)                                 ==>  ""