Project

General

Profile

$regex » History » Version 2

Per Amundsen, 08/13/2015 10:33 AM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*$regex([name], text, re)*
4
5
Returns the number of strings in text that matched the [[Scripting_Regex|regular expression}].
6
7
*Parameters*
8
9
[name} - Name of the search, which can later be referenced using [[$regml]].
10
text - The text to search.
11
re - The [[Scripting_Regex|regular expression}] to perform.
12
13
*Example*
14
15
<pre>
16
; Search the text for the pattern '(hello)' and print the result.
17
//echo -ag Number of matches: $regex(Hello World, /(hello)/) match 1 is: $regml(1)
18 2 Per Amundsen
</pre>