Skip to content
Local time9:41am12 March, 2025

What it does

A regex alternation returns the FIRST branch that matches, not the longest, so an earlier alternative that is a prefix of a later one truncates the match.

How it helps you

Text matching picks the full match rather than a shorter one.

Tested against itself

6 deliberate breaks, all caught

We change this check on purpose and watch its test fail. Each dot is one of those changes.

Details

CategoryCode quality
Also filed underTest quality
Checks in this category216
ISO/IEC 25010Maintainability: modifiability
Breaks caught6