Skip to content

escaped forward slashes? #20

Closed
Closed
@davidszotten

Description

@davidszotten

Hi,

when trying to use rure on https://github.com/ua-parser/uap-core, i came across this behaviour where rure isn't consistent with re. i'm not sure who's "right"

$ python
Python 3.7.3 (default, May  6 2019, 08:10:06)
[Clang 9.0.0 (clang-900.0.38)] on darwin
>>> import re, rure
>>> re.match('\/', '/')
<re.Match object; span=(0, 1), match='/'>
>>> rure.match('\/', '/')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
[snip]
rure.exceptions.RegexSyntaxError: regex parse error:
    \/
    ^^
error: unrecognized escape sequence

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions