Project

General

Profile

Actions

$regex » History » Revision 7

« Previous | Revision 7/10 (diff) | Next »
Per Amundsen, 01/16/2019 09:16 PM


Added in 1.9.0

$regex([name], text, re)

Returns the number of strings in text that matched the regular expression.

See also $regsubex, $regml, $regmlex.

Parameters

[name] - Name of the search, which can later be referenced using $regml. (optional)
text - The text to search.
re - The regular expression to perform.

Example

; Search the text for the pattern '(hello)' and print the result.
//echo -ag Number of matches: $regex(Hello World, /(Hello)/) match 1 is: $regml(1)

Updated by Per Amundsen almost 6 years ago · 7 revisions

Also available in: PDF HTML TXT