$findtok » History » Version 2
Per Amundsen, 08/10/2015 05:14 AM
| 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 | 2 | Per Amundsen | text - The text to tokenize. |
| 12 | 1 | Per Amundsen | token - The token to find. |
| 13 | 2 | Per Amundsen | N - The Nth token to find. |
| 14 | C - The "ASCII":http://www.asciitable.com/ value to tokenize by. |
||
| 15 | 1 | Per Amundsen | |
| 16 | *Example* |
||
| 17 | |||
| 18 | <pre> |
||
| 19 | ; Find position where token 'c' starts. |
||
| 20 | //echo -ag $findtok(a.b.c.d,c,1,46) |
||
| 21 | </pre> |