itsmeadarsh2008 / flpc

A Rust-based regex crate wrapper for Python3 to get faster performance. 👾
https://pypi.org/project/flpc/
MIT License
64 stars 1 forks source link

Does flpc supports look-around, including look-ahead and look-behind? #4

Closed prakhar7184 closed 3 weeks ago

prakhar7184 commented 4 weeks ago

I have a case where I need to use "not" feature of regular expression like (?! value ) that means value should not be there. So can you please help me with any example pattern to use this case or help me out. Thanks Prakhar

itsmeadarsh2008 commented 3 weeks ago

The regex crate does not support it, so I can't help you. This project aims to wrap the regex crate for performance use cases. Thus, there may be features that Python supports but rust regex doesn't.

PS D:\dev> python .\main.py
Traceback (most recent call last):
  File "D:\dev\main.py", line 13, in <module>
    matches = match_pattern(pattern, text)
  File "D:\dev\main.py", line 5, in match_pattern
    compiled_pattern = re.compile(pattern)
ValueError: regex parse error:
    apple(?= pie)
         ^^^
error: look-around, including look-ahead and look-behind, is not supported