$findtok » History » Version 3
Per Amundsen, 02/22/2023 04:58 PM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | *$findtok(text,token,N,C)* |
||
4 | |||
5 | Returns the position of the Nth matching token in text. |
||
6 | |||
7 | 2 | Per Amundsen | _[[$findtok]] is case-insensitive, see [[$findtokcs]] for case-sensitive version._ |
8 | |||
9 | 1 | Per Amundsen | *Parameters* |
10 | |||
11 | 3 | Per Amundsen | table(ktable). |
12 | |*Parameter*|*Description*| |
||
13 | | text | The text to tokenize. | |
||
14 | | token | The token to find. | |
||
15 | | N | The Nth token to find. | |
||
16 | | C | The "ASCII":http://www.asciitable.com/ value to tokenize by. | |
||
17 | 1 | Per Amundsen | |
18 | *Example* |
||
19 | |||
20 | <pre> |
||
21 | ; Find position where token 'c' starts. |
||
22 | //echo -ag $findtok(a.b.c.d,c,1,46) |
||
23 | </pre> |