You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Selfoss accepts only / (forward slash) as delimiter. Php accepts even more.
A delimiter can be any non-alphanumeric, non-backslash, non-whitespace character.
[...]
It is also possible to use bracket style delimiters where the opening and closing brackets are the starting and ending delimiter, respectively. (), {}, [] and <> are all valid bracket style delimiter pairs.
(https://www.php.net/manual/en/regexp.reference.delimiters.php)
In case it is to complecated to check this, I would like to have atleast one more option, because url filters mostly contain slashes which have to be escaped when using slashes as delimiter. When using forexample () as delimiter, this is not required.
The text was updated successfully, but these errors were encountered:
I limited the number of recognized symbols in anticipation of fixed string filters but I guess using the special characters in fixed string matching will be quite unlikely and we could always introduce special prefix e.g. r# for raw string.
I think few extra special characters will not be a problem for now now, since we only allow a single filter expression. More delimiters will just make the regex filter-matching regex slightly more complex:
if (@preg_match('/^\\/((?<!\\\\)(?:\\\\)*\\/|[^\\/])*\\/$/', $regex) === 0) {
It will be more annoying once we add support for logical operators, when we might want to use parentheses to group operands but I cannot come up with a reason against the other brackets:
Selfoss accepts only / (forward slash) as delimiter. Php accepts even more.
In case it is to complecated to check this, I would like to have atleast one more option, because url filters mostly contain slashes which have to be escaped when using slashes as delimiter. When using forexample () as delimiter, this is not required.
The text was updated successfully, but these errors were encountered: