-
-
Notifications
You must be signed in to change notification settings - Fork 958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regex flag have an unexpected behavior #4482
Comments
The remaining question is whether this is expected behavior or not... Issue #4482
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). |
Exact ! 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/1
Expected 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
:The text was updated successfully, but these errors were encountered: