Project

General

Profile

$fline » History » Version 2

Per Amundsen, 08/11/2015 04:37 AM

1 1 Per Amundsen
_Added in 1.9.0_
2
3 2 Per Amundsen
*$fline(@name,wildtext,N,[T])*
4 1 Per Amundsen
5
Returns Nth position of line which matches the specified wildcard text.
6
7
*Parameters*
8
9
@name - The custom window name to search.
10
wildtext - Wildcard text to search for.
11
N - If N = 0 returns number of matches, otherwise the Nth match.
12
T - If T = 0 reference the display area (default), If T is 1, it references the listbox, 2 implies that wildtext is a regular expression, and 3 for both. (optional)
13
14
*Example*
15
16
<pre>
17
; Open a custom window.
18
/window @Example
19
20
; Add some lines
21
/aline @Example Test1
22
/aline @Example Test2
23
/aline @Example Test3
24
25
; Search the display area for the wildtext 'Text*' and print number of results.
26
//echo -ag $fline(@Example, Test*, 0)
27
28
; Search the display area for the wildtext 'Text*' and print the second result.
29
//echo -ag $fline(@Example, Test*, 2)
30
</pre>