Skip to main content

Regular Expressions

For advanced searches, enable Regular expression (RegEx) in the Find pane. Your search text is then interpreted as a pattern rather than as literal text.

Enabling RegEx

  1. Open the Find pane and type your pattern.
  2. Enable the Regular expression (RegEx) option.
  3. Start the search.

When RegEx is enabled, the Whole word option is disabled because it does not apply to patterns. The Match case option still applies: with it off, the pattern matches case-insensitively.

Syntax

O&O RegEditor uses the ECMAScript regular-expression syntax. A few useful elements:

PatternMatches
.Any single character.
^ / $The start / end of the text.
a|bEither a or b.
[0-9]Any digit.
\d, \w, \sA digit, a word character, or whitespace.
*, +, ?Zero-or-more, one-or-more, zero-or-one of the preceding element.
{2,4}Between two and four repetitions.

Examples

GoalPattern
Find Dword or BinDword|Bin
Find a value whose data is exactly StrVal^StrVal$
Find entries ending in .exe\.exe$
Find a GUID-like value\{[0-9A-Fa-f-]+\}

Invalid Patterns

If a pattern cannot be compiled — for example an unbalanced bracket such as [invalid — O&O RegEditor shows an error message and does not start the search. Correct the pattern and try again.

Test on a narrow branch first

Regular-expression searches can match a lot. Select a specific key before searching so the result list stays manageable while you refine the pattern.