Skip to content

look behind unimplemented #180

Open
Open
@aaangeletakis

Description

@aaangeletakis

The following regex fails to compile with the error:

"Regular Expression contains syntax error."

I suspect it has to due to the digit look behind in the floating-point literals rule.

R"([a-zA-Z]{0,2}?(("|')(\2{2})?)((?:[^\\"]|\\.|\\)*\1)?|)"  //capture strings - check later on if string
                                                            //                  prefix is valid and the string terminates
R"((#[^\r\n]*)|)"                                           //capture comments
R"(([\n\r][ \t]*)|)"                                        //capture newlines
R"((\\[^\r\n]*)|)"                                          //capture \TheBackslashAndAnythingAfterIt
R"(()"
    R"((\.{3})|)"                                           //capture ...
    R"((->)|)"
    R"((\d*(\.\d*)?)(?<=\d)(([eE]-?[\d_]*)|[\w]*)|)"        //floating point numbers
    R"(([<>*\/]{2})=?|)"                                    //capture 2-3 character operators
    R"(([!%&*+\-<=>@\/\\^|:]=))"                            //capture 2 caracter operators
R"()|)"
R"(([!-\/:-@\[-^{-~]|[^\s!-\/:-@\[-^{-~]+)|)"               //capture anything else
R"((\s+))"                                                  //capture whitespace in order to keep track of position with ctre

https://regex101.com/r/MkA1rH/1

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions