Add Method (Filters Collection)

Adds an item.

[JavaScript]

list.Add( strFilter, bEnabled, iColumn, nFlags, xBegin, xEnd, strReplace, nExFlags );

[VBScript]

list.Add strFilter, bEnabled, iColumn, nFlags, xBegin, xEnd, strReplace, nExFlags

Parameters

strFilter

Specifies a string to search for.

bEnabled

Specifies whether this filter is enabled.

iColumn

Specifies the one-based index of the column of the text you want to search, 0 if you want to search for whole lines, or -1 if you want to specify the beginning and end of the text in characters as xBegin and xEnd.

nFlags

Specifies a combination of the following values.

eeFindLogicalOr

Specifies a logical disjunction (logical OR) to the previous level in case of multiple levels of the filter.

eeFindNegative

Shows the Filter toolbar and excludes the lines that match the specified string.

eeFindReplaceCase

Matches cases.

eeFindReplaceEscSeq

Uses escape sequences. Cannot be combined with eeFindReplaceRegExp.

eeFindReplaceOnlyWord

Matches only whole words.

eeFindReplaceRegExp

Uses a regular expression for the searched string. Cannot be combined with eeFindReplaceEscSeq.

eeFindWholeString

Matches whole strings.

xBegin

Specifies the index of beginning of the column (in logical characters) of the text you want to search, or 0 if you want to count the last portion of the text and specify as xEnd. The iColumn must be -1 to enable this field.

xEnd

Specifies the index of end of the column (in logical characters) of the text you want to search, or 0 if you want to search all the rest of the text. The iColumn must be -1 to enable this field.

strFilter

Specifies a string to replace with.

nExFlags

Specifies a combination of the following values.

eeExFindLinkFile

Specifies strFilter is the file path to a linked file that contains multiple search strings divided by newlines. If a tab character is included in a line, the search string is the first string not including the tab character. strFilter may be a relative path from the EmEditor install path. It may contain environment variables such as %USERPROFILE%. To specify a file in the running macro folder, use this form:
ScriptFullName.substr( 0, ScriptFullName.lastIndexOf( "\\" ) + 1 ) + "LinkFile.txt"

eeExFindNumberRange

Matches a number range expression. This flag cannot be combined with eeFindReplaceEscSeq or eeFindReplaceRegExp.

eeExFindFuzzy

Uses fuzzy matching.

Version

Supported on EmEditor Professional Version 16.0 or later.