0

I am testing an Rstudio regex on regex101.com: ([0-9]+([+\\-\\*\/]+[0-9]+){1,}) works fine with my test data:

1/3
1+2
1/3
10*2
10*8/3

However when I put that regex into Rstudio it freaks out because \/ is not a valid escape character (but this was required for the regex101.com to work)

What is the difference between the ways regex is being evaluated in the two programs?

Justification for re-opening:

  • This question is not intended to deal with a specific regex (I included the one above just as an example).
  • I have never see an answer to the actual question asked in this post. Although there are many specific regex questions this is intended to be more of a general difference between regex types question (eg Perl regex vs Notepad++).
  • Rilcon42
    • 9,584
    • 18
    • 83
    • 167

    0 Answers0