Project

General

Profile

$matchtokcs » History » Version 3

Per Amundsen, 02/23/2023 04:51 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*$matchtokcs(text,string,N,C)*
4
5
Returns tokens that contain the specified string.
6
7
_[[$matchtokcs]] is case-sensitive, see [[$matchtok]] for case-insensitive version._
8
9
*Parameters*
10
11 3 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 2 Per Amundsen
//echo -ag $matchtokcs(onE two thrEe, E, 0, 32)
23 1 Per Amundsen
24
; Returns the second match
25 2 Per Amundsen
//echo -ag $matchtokcs(onE two thrEe, E, 2, 32)
26 1 Per Amundsen
</pre>