EmEditor Home - EmEditor Help - Plug-in Reference - Structures

GREP_INFOA

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

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_ONLY_WORD Searches only words.
FLAG_FIND_REG_EXP Uses a regular expression. Cannot be combined with FLAG_FIND_ESCAPE.
FLAG_FIND_RECURSIVE Searches in subfolders of the specified path.
FLAG_FIND_FILENAMES_ONLY Displays files names only.
FLAG_REPLACE_KEEP_OPEN Keeps the modified files open. Cannot combine with eeReplaceBackup. Cannot be combined with FLAG_REPLACE_BACKUP.
FLAG_REPLACE_BACKUP Saves the backups. Cannot be combined with FLAG_REPLACE_KEEP_OPEN.
FLAG_FIND_IGNORE_FILES Ignores the files or folders specified by pszFilesToIgnore.
FLAG_FIND_OUTPUT Redirects search results to the Output Bar.

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.

Copyright 2003-2015 by Emurasoft, Inc.