0.41.0 - Added support for modifier 'n'
π T-Regx The Dinosaur is really proud to announce its release 0.41.0
!
We've been working our fingers to the bone before official release of PHP 8.2, and with it comes the new and shiny /n
modifier - "no auto capture". Some of us have been waiting for a long time, and in T-Regx we're not discriminating, and each PHP version should work the same. Because of that, we're backporting /n
modifier to every PHP version supported. So if you're using T-Regx on PHP as old as 7.1, you are free to use /n
in Pattern
and PcrePattern
to its fullest. It's completely supported. That feature is available as of version 0.41.0
.
The modifier n
can be used on each PHP version (since T-Regx 0.41.0) seamlessly. That means, any usage of modifier n
in any part of the library (including the regular expression itself) works out of the box, as if the library was running on PHP 8.2.
The detailed list of changes is in ChangeLog.md.
- Features
- Since
0.41.0
T-Regx officially supports PHP 8.2. - Added full support for
n
modifier for every supported PHP version:7.1
-8.2
-
Despite modifier
/n
being only valid in vanilla regexp in PHP only since8.2
,
modifier/n
is fully supported in T-Regx in each PHP version. -
Added full support for
n
modifier inPattern
Pattern::of($pattern, 'n')
is now acceptedPattern::inject($pattern, $figures, 'n')
is now acceptedPattern::template($pattern, 'n')
is now acceptedPattern::builder($pattern, 'n')
is now acceptedPattern::literal($text, 'n')
is now acceptedPattern::alteration($texts, 'n')
is now acceptedPattern::mask($mask, $keywords, 'n')
is now acceptedPattern::list()
now accepts patterns withn
modifier
-
Added full support for
n
modifier inPcrePattern
PcrePattern::of("/$pattern/n", )
is now acceptedPcrePattern::inject("/$pattern/n", $figures)
is now acceptedPcrePattern::template("/$pattern/n")
is now acceptedPcrePattern::builder("/$pattern/n")
is now accepted
-
- Added public modifier constant to
Pattern
.-
Added
Pattern::NO_AUTOCAPTURE
From now on, patterns can be constructed with such constants, for example:
Pattern::of('^(foo)$', Pattern::NO_AUTOCAPTURE)
String literal modifiers continue to work as before
Pattern::of('^(foo)$', 'n');
-
- Since
The detailed list of changes is in ChangeLog.md.
Rawrrrrrrr!