StackOverflowError in RegexStoryParser with long scenario titles
Description
Recently we started to use JBehave 3.5.1 in my project and since we use it as a way to automate our systems testing we have a need for rather long textual descriptions between the Scenario-keyword and the first Given. Then we run into the problem with long strings and the long known bug in Java RegExp library. I constructed a unit test that reproduces the error and then found a simple fix and some performance enhancement in the RegexStoryParser (patch attached).
Recently we started to use JBehave 3.5.1 in my project and since we use it as a way to automate our systems testing we have a need for rather long textual descriptions between the Scenario-keyword and the first Given. Then we run into the problem with long strings and the long known bug in Java RegExp library. I constructed a unit test that reproduces the error and then found a simple fix and some performance enhancement in the RegexStoryParser (patch attached).