# RegEx Examples: Filename Alignment Overide

In BC, the syntax is more of an _ode_ to Regex than it is full-on Unix Regex.&#x20;

From the menu, choosing `Rules->Misc->AlignmentOveride->[+]` we would put&#x20;

**LEFT** `(\w+)(\d+).txt`&#x20;

**RIGHT** `$1_$2.log`&#x20;

where the $1 and $2 are the captured text from the left side.&#x20;

The logic under the BC hood is roughly shown in the screenshot below.

![](https://1446155253-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LXUX-uoaZJ8T4qyEc-x%2F-Ll38iSC7Qraps4gy1Pd%2F-Ll39RZbpZHCRwlCuj0H%2Fimage.png?alt=media\&token=fb1f52e2-f115-412e-9acb-af0d17269c52)

More RegEx examples:  [https://beyondcompare.gitbook.io/project/text-compare/how-to-use-regular-expressions-in-beyond-compare-to-ignore-trivial-differences-like-timestamps](https://beyondcompare.gitbook.io/project/text-compare/how-to-use-regular-expressions-in-beyond-compare-to-ignore-trivial-differences-like-timestamps) &#x20;
