Project

General

Profile

$matchtok » History » Version 2

Per Amundsen, 02/23/2023 05:13 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*$matchtok(text,string,N,C)*
4
5
Returns tokens that contain the specified string.
6
7
_[[$matchtok]] is case-insensitive, see [[$matchtokcs]] for case-sensitive version._
8
9
*Parameters*
10
11 2 Per Amundsen
table(ktable).
12
|*Parameter*|*Description*|
13
| text | The text to tokenize. |
14
| string | Search string. |
15
| N | If N is 0, returns number of matches, otherwise returns the Nth match. |
16
| C | The "ASCII":http://www.asciitable.com/ value to tokenize by. |
17 1 Per Amundsen
18
*Example*
19
20
<pre>
21
; Returns number of matches
22
//echo -ag $matchtok(one two three, e, 0, 32)
23
24
; Returns the second match
25
//echo -ag $matchtok(one two three, e, 2, 32)
26
</pre>