VIDEOMONTAZHERDAVINCI RESOLVE · VIDEO · AI

FUSION · NODE REFERENCE

LayerRegex

Find, rename and filter named layers

LayerRegex applies an independent naming rule to each of two inputs. Transform renames, Keep retains matches and Remove deletes matches; Conflicts chooses the output Default/[Main].

Channels & LayersAdvanced

LayerRegex

Overview

What LayerRegex does

Image 1 and Image 2 each have independent Expression, Mode, Name Template, Unmatched and Tester controls. One input does not inherit the other input’s rule. With two sources, validate each block separately, then the combined result and main layer.

Expression matches characters in the name. Parentheses create groups, referenced in Name Template by $1, $2 and subsequent numbers. The documented (.*) and Right.$1 example adds a prefix; $1.Right adds a suffix. Using $1 with (.*) returns the original name.

Transform renames matched layers. Keep filters for matching names; the manual explicitly describes removing the others. Remove deletes matches. Unmatched separately describes retaining or discarding nonmatches; Keep preserves the untouched portion during renaming. Do not describe Keep mode as neutral by assuming that every Inspector field remains active in every mode.

An expression can match part of a name. For example, right(.*) can affect names beyond those beginning with right; ^right(.*) restricts the start. The manual also shows alternatives such as (copy|right) and the inline (?i) case-insensitive modifier. Do not copy JavaScript /pattern/gi wrappers or unverified features from another engine.

Conflicts selects the input used for output Default/[Main]. The manual does not define it as a general replacement strategy for equally named AOVs. If both sets must survive, use distinct namespaces such as Left.pass.* and Right.pass.*, then verify that no resulting pass duplicates another.

Test at least a matching name, a nonmatching name, a similar name and a case variation. Then inspect the real output layer list: Tester helps validate the string rule, but it does not certify every source’s contents or the exported EXR.

When to use it

  • Remove a known prefix from selected render passes while retaining other names.

  • Separate two sources into Left/Right or Old/New layer namespaces.

  • Remove temporary layers with a verifiable naming pattern.

  • Retain only layers matching an explicit rule.

  • Prepare names for LayerMuxer and inspect the list before export.