T-Regx icon indicating copy to clipboard operation
T-Regx copied to clipboard

Simple library for regular expressions in PHP.

Results 10 T-Regx issues
Sort by recently updated
recently updated
newest added

We're trying to make T-Regx reliable on PHP 8.2, probably it currently runs fine on PHP8.2, but we're not sure of that yet. For example, certain error messages from PCRE...

in progress
future-release

That way, we could build regular expressions with in-pattern flags. ```php Pattern::template("return @();")->pattern('strlen', 'i'); ``` That would match ``` return strlen(); return strLen(); return STRLEN(); ``` but not ``` RETURN...

feature

Currently, users of PHP regexp have only two choices: - `preg_match_all()`, which performs all available matches right away - `preg_match()`, which performs only a single match The problem with `preg_match_all()`,...

question
feature

To do: - [ ] Change namespace `TRegx\CleanRegex\` to `TRegx\Pattern\` - [x] Change namespace `TRegx\SafeRegex\` to `TRegx\Preg\` - [ ] Design `ReadMe.md` for both projects

in progress
future-release

Its possible to protect against CatastrophicBacktrackingException when we're going `replace()->only(int)->callback()`, if `Detail` isn't used with `group()`, `all()` or `usingDuplicateName()`.

feature

Currently, documentation states that "you only need to replace `preg_` with `preg::`", but that's not true, since you also need to add the namespace. We should remove the namesapce so...

question
future-release

- [ ] Include a detailed documentation of every public method - [ ] Include only `@param`, `@returns` and `@throws` tags. - [ ] Include `@psalm` and `@phpstan` annotations -...

documentation
priority
in progress

Add: - refactorings - inspections - quick fixes Example actions and inspections could include: - change `$pattern->match($s)->test()` to `$pattern->test($s)` - change `$pattern->match($s)->first()->text()` to `$pattern->search($s)->first()` - change `Pattern::inject('@', [$value]);` to `Pattern::literal($value)`