GREP_INFOA

Used by Editor_FindInFilesA macro, Editor_ReplaceInFilesA inline functions ( EE_FIND_IN_FILESA message, EE_REPLACE_IN_FILESA message s).

typedef struct _GREP_INFOA {
	UINT cbSize;
	UINT nCP;
	UINT nFlags;
	LPCSTR pszFind;
	LPCSTR pszReplace;
	LPCSTR pszPath;
	LPCSTR pszBackupPath;
	LPCSTR pszFilesToIgnore;
} GREP_INFOA;

Fields

cbSize

Specifies size of (GREP_INFOA).

nCP

Specifies a code page by which a file is opened.

CODEPAGE_ANSI

Normal ANSI

CODEPAGE_UNICODE

Unicode little endian

CODEPAGE_UNICODE_BIGENDIAN

Unicode big endian

CODEPAGE_UTF8

UTF-8

CODEPAGE_UTF7

UTF-7

CODEPAGE_932

Japanese Shift JIS

CODEPAGE_JIS

Japanese JIS

CODEPAGE_EUC

Japanese EUC

CODEPAGE_AUTO_SJIS_JIS

Converts from Japanese Shift JIS and JIS.

CODEPAGE_AUTO_SJIS_JIS_EUC

Converts form Japanese Shift JIS、JIS、EUC.

Others

All code pages you can used by system.

CODEPAGE_DETECT_UNICODE

Detects Unicode. Can be combined with another value.

CODEPAGE_DETECT_UTF8

Detects UTF-8. Can be combined with another value.

CODEPAGE_DETECT_CHARSET

Detects HTML/XML Charset. Can be combined with another value.

CODEPAGE_DETECT_ALL

Detects all code pages. Can be combined with another value.

nFlags

Specifies a combination of the following values.

FLAG_FIND_CASE

Matches cases.

FLAG_FIND_ESCAPE

Uses escape sequences. Cannot be combined with FLAG_FIND_REG_EXP.

FLAG_FIND_FILENAMES_ONLY

Only file names will be displayed and the whole lines containing the searched string will not be displayed as results. Cannot combine with FLAG_FIND_LINE_ONLY or FLAG_FIND_MATCHED_ONLY.

FLAG_FIND_IGNORE_FILES

Ignores the files or folders specified by pszFilesToIgnore.

FLAG_FIND_LINE_ONLY

Only the whole lines containing the searched string will be displayed as results. Cannot combine with FLAG_FIND_FILENAMES_ONLY or FLAG_FIND_MATCHED_ONLY.

FLAG_FIND_MATCHED_ONLY

Only the matched strings will be displayed as results. Cannot combine with FLAG_FIND_FILENAMES_ONLY or FLAG_FIND_LINE_ONLY.

FLAG_FIND_ONLY_WORD

Searches only words.

FLAG_FIND_RECURSIVE

Searches in subfolders of the specified path.

FLAG_FIND_REG_EXP

Uses a regular expression. Cannot be combined with FLAG_FIND_ESCAPE.

FLAG_FIND_OPEN_DIRECT

Directly opens the document that includes the specified string. Cannot combine with FLAG_FIND_OPEN_FILTER or FLAG_FIND_OUTPUT.

FLAG_FIND_OPEN_FILTER

Directly opens the document that includes the specified string, and set the specified string as the filter. Cannot combine with FLAG_FIND_OPEN_DIRECT or FLAG_FIND_OUTPUT.

FLAG_FIND_OUTPUT

Displays the Find in Files results as a list in the Output Bar. Cannot combine with FLAG_FIND_OPEN_DIRECT or FLAG_FIND_OPEN_FILTER.

FLAG_REPLACE_BACKUP

Saves the backups. Cannot be combined with FLAG_REPLACE_KEEP_OPEN.

FLAG_REPLACE_KEEP_OPEN

Keeps the modified files open. Cannot combine with eeReplaceBackup. Cannot be combined with FLAG_REPLACE_BACKUP.

pszFind

Specifies a string to search for.

pszReplace

When replacing in files, specifies a string to replace with.

pszPath

Specifies a path to search from. It can include wild cards such as * and ?.

pszBackupPath

When replacing in files, specifies the backup folder, if nFlags includes FLAG_REPLACE_BACKUP.

pszFilesToIgnore

If nFlags includes FLAG_FIND_IGNORE_FILES, specifies the file or folder names to ignore. It can include wild cards such as * and ?. To specify multiple files, use semicolons (;) to separate them.

Version

Supported on EmEditor Professional Version 4.02 or later.