Closed Heziode closed 4 years ago
The problem here is that flag parsing handles escape sequences as well, so your expression is parsed as: ((?:@:(|{)[^)}]+(?:)|}))
This matches exactly what you observe: https://regex101.com/r/O9zVx5/1
Such behavior is probably not desired, I will look whether it's possible to address this (especially whether something else relies in this behavior).
The problem here is that flag parsing handles escape sequences as well, so your expression is parsed as:
((?:@:(|{)[^)}]+(?:)|}))
Exact !
Furthermore, it's planed to add regex support for placeholders ?
Furthermore, it's planed to add regex support for placeholders ?
No, feel free to create separate issue for that.
The issue you have reported seems to be resolved now.
Describe the bug
Regex flag do not capture the last character when it is a closing parenthesis. Regex flag do not capture well pattern inside
{
and}
.To Reproduce
Steps to reproduce the behavior:
I add this regex flag:
regex:"((?:@:\(|\{)[^\)\}]+(?:\)|\}))"
Testing string:@:(foo.bar.baz) | @:(hello.world) | {foo32}
Check on regex101: https://regex101.com/r/SZVYGO/1Expected behavior
Regex flag do capture the last character when it is a closing parenthesis. Regex flag do capture well pattern inside
{
and}
.Screenshots
Server configuration and status
docker-compose exec weblate weblate list_versions
:Weblate deploy checks
docker-compose exec --user weblate weblate weblate check --deploy
: