Hex Editor - Binary File Editing Software for Windows
Download Hex Editor Neo Hide this button

Replace Pattern Syntax

Hex Editor Neo allows you to use special characters in replace pattern when performing commands Replace and Replace All in regular expressions mode.

The main advantage of using regular expressions during pattern matching operations is the ability to match different patterns with a single expression. This function is natively cooperated with an ability to refer to matched pattern in replace pattern. Hex Editor Neo allows you to perform such referrals.

All characters in a replace pattern are treated “as is”, except for the following character combinations:

CombinationDescription
$&Refers to the whole matched expression.
$nWhere n is [1..9]: Refers to numbered sub-expression of matched expression.
$$Means a single $ character.
\xnnWhere n is [0..9] or [a..f] or [A..F]: A single hexadecimal code byte. Can be used only if performing search/replace in single-byte string mode (ASCII or encoded).
\xnnnnWhere n is [0..9 or [a..f] or [A..F]: A single hexadecimal code word. Can be used only if performing search/replace in UNICODE mode.