PatternVariableBuilder can be extremely inefficient in some cases

Description

When org.jbehave.core.steps.PatternVariantBuilder#variantsFor is called, the following regex is used -

.
Matching with this regex can be very lengthy and CPU intensive when there is an unmatched curly bracket for example, like here:

Assignee

Unassigned

Reporter

Victor Rosenberg

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure