Open CrosRoad95 opened 1 year ago
It's not regex, it's PCRE expressions
naming is very simmular like PHP for example: https://www.php.net/manual/ru/function.preg-match.php
and etc..
We don't have regex expressions like in Javascript, i think we should add new functions instead of replace current names.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
local regex = createRegex(...) regexMatch(regex, ...)
can be beneficial in hot paths
Or do it a bit different, make regex functions compile in background regex, if you do pregMatch(x) for the first time, regex gets compiled and stored in cache, then if you use this function again with same regex it will reuse previously compiled regex. Remember to add some functionality that will cache up to 1000 regexes, maybe it should be configurable from server config
Describe alternatives you've considered
/
Additional context
are there any other functions we can add apart of find, match and replace?
Security Policy