Batch File Replace

Batch File Replace

This wizard implements "Replace in Files" function in IDE. If a file was open in IDE, manual saving needed after replacing because modificaitions only affects editor buffer.

Note: Opened DFM files in IDE replacing is NOT supported! If you need to do so, please use 'In directories' mode.

There's NO confirming dialog when replacing, so there may be dangerous in replacing. It's recommended that search and confirm what to replace before actual replaceing.

- Text: Here to specify what to search and replace. Only single-line text is supported.

- Options: Here to set searching and matching mode.

  - Case Sensitive: Match case or not when searching.

  - Whole Word Only: Match whole word only or not when searching.

  - Regular Expression: Regular expression used or not when searching. See below.

  - Ansi Compatible: Use ansi compatible mode or not when searching. It may be required when searching in some certain char-set text.

- Range: You can specify the searching range, which can be current file, files in current project/projectgroup, all opened files and files in directory.

- Search Directory: Here to set searching directory and file name filters when searching mode is set to "In Directory".

Regular Expression

Regular expression is technically a defined grammar for use in complex pattern searching. For example, if you want to search unit and init, you can use [ui]nit in searching text.

Note: This wizard does NOT support wildchar * and ? . Those are supported as below:

- \ : Backslash is an Escaped character.A number of characters have special meanings to regular expressions. A symbol with a special meaning can be matched, but to do so you must prefix it with the backslash character (this includes the backslash character itself: to match one backslash in the target, your regular expression should include "\\").

- ^ : Match the beginning of a line.

- $ : Match the end of a line.

- . : A period can stand for any character. For example, 'f.r' can match 'for' or 'far'.

- : Colons means matching a set of characters. e.g. ':a' means all alphabets, ':d' means a digital. ':n' means an alphabets or a ditigal. ': ' means a space or tab or other control or sign characters(ASCII 0x01-0x40).

- [...] : Rather than name only a single character, you can include a pattern in a regular expression that matches any of a set of characters. A set of characters can be given as a simple list inside square brackets. e.g. [xyz] will match a single character x or y or z. [^xyz] will match a single character which is not x or y or z. And if a caret symbol was used at the beginning of a character class, it reverses the meaning of the character class. Everything NOT included in the listed character set is matched. If only a caret in square brackets, it means match any character except new line characters 0x0D and 0x0A. For letter or number ranges you may also use only the first and last letter of a range, with a dash in the middle, e.g. [a-z] means matching all lowercase, but [z-a] matches nothing.

Links

Basic Operation

CnWizards Settings

About CnWizards

Copyrights 2001-2015 CnPack Team