$matchtok » History » Version 1
Per Amundsen, 08/10/2015 05:26 AM
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 | text - The text to tokenize. |
||
12 | string - Search string. |
||
13 | N - If N is 0, returns number of matches, otherwise returns the Nth match. |
||
14 | C - The "ASCII":http://www.asciitable.com/ value to tokenize by. |
||
15 | |||
16 | *Example* |
||
17 | |||
18 | <pre> |
||
19 | ; Returns number of matches |
||
20 | //echo -ag $matchtok(one two three, e, 0, 32) |
||
21 | |||
22 | ; Returns the second match |
||
23 | //echo -ag $matchtok(one two three, e, 2, 32) |
||
24 | </pre> |