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
I used regex-info to build an ECMAScript regex to match Unix-style relative file paths. To prevent .. from appearing at the start, I used a look-ahead assertion, ^(?![.]{2}\/). Alas, the regex crate does not support look-arounds:
The regex syntax supported by this crate is similar to other regex engines, but it lacks several features that are not known how to implement efficiently. This includes, but is not limited to, look-around and backreferences.
I'm just getting familiar with Rust myself, but in poking around, like in rust-lang/regex#841, it looks like the solution is to use fancy_regex instead. I wonder if that would make sense here, or if using something like ecma_regex would be more appropriate…
The text was updated successfully, but these errors were encountered:
I used regex-info to build an ECMAScript regex to match Unix-style relative file paths. To prevent
..
from appearing at the start, I used a look-ahead assertion,^(?![.]{2}\/)
. Alas, the regex crate does not support look-arounds:I'm just getting familiar with Rust myself, but in poking around, like in rust-lang/regex#841, it looks like the solution is to use fancy_regex instead. I wonder if that would make sense here, or if using something like ecma_regex would be more appropriate…
The text was updated successfully, but these errors were encountered: