Added in 1.9.4
/filter [-asdfkwxnpriocteubglLz] [n-n2] [c s] <infile | dialog id> <outfile | dialog id | alias> [alias] <matchtext>
Scans lines of text in a window, file or dialog control, any matches are then written out to another window, file, or dialog control.
The order of the switch are important, they define what is the infile and what is the outfile, see the examples for more information.
The $filtered identifier will retrieve the number of matches found.
Switches
Parameters
[n-n2] - if -r is used, indicates the range of lines to be scanned*
[c s] - if -t is used, indicates how to do the sort
<infile | dialog id> - if no switch implies a window's name to be use as the infile, you must provide an infile (a window, a file, or a dialog control)
<outfile | dialog id | alias> - if no switch implies a window's name to be used as the outfile, you must provide an outfile (a window, a file, a dialog control, or an alias name if -k is used)
[alias] - optional alias called if -a is used
<matchtext> - the expression used for the search, if $null is used, it matches everything.
;filter from the file "c:\my file.txt" to the custom window @mywin /filter -fw "c:\my file.txt" @mywin *findthis* ;filter from the custom window @mywin to the file "c:\my file.txt" filter -wf @mywin "c:\my file.txt" *findthat* ;filter from the status window to the single message window /filter -sd *findthis* ;filter from the single message window to the status window /filter -ds *findthat* ;filter from the filename @this_is_a_file to the dialog 'dialog', id '1' /filter -fo @this_is_a_file dialog 1 *findthis* ;filter from a file and call an alias for each line /filter -fk file myalias *findthat* ;filter from a file to a file using regex /filter -ffg file1 file2 /regex here/