This release brings updates in exceptions (namespaces, new detailed exceptions) and a
In previous release we renamed
PregException. In this, we're renaming
PatternException. So now, those two general exceptions sync nicely with their base methods:
They both extend
RegexException - base for all exceptions thrown by T-Regx. So that's the first thing.
The second exception update - previously, every exception thrown based on
preg_last_error() method was
RuntimePregException. Now, each error has a dedicated exception, which can be caught separately:
The detailed list of changes is in ChangeLog.md.
This release also comes with a brand new method -
groupBy() which groups matches by a capturing group (name or index). It can match strings, offsets and also map them with
flatMap(). Additionally, it can be chained with
filter() to leave out unwanted matches: