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
Convert Go regex to Rust regex
Go and Rust have some differences in their regex implementation. In Go
the following is valid:
```
uri=~"/v[1-9]/.*/{gid}/{uid}"
```
Rust sees the `{gid}` as a bad repetition, it expects a range like {1,4}
```
regex parse error:
/v[1-9]/.*/{gid}/{uid}
^
error: repetition quantifier expects a valid decimal
```
For it to be a valid Rust regex the opening { has to be escaped.
This change adds that escaping.
The implementation is simple, iteration + writing in a result buffer. It
is probably not the best of nicest way of doing it, but it straight
forward
0 commit comments