0

I'm trying to build a regex with a raw f-string in a Sublime Text 3.2.2 plugin:

operatorSymbols = "==|!="
print(fr'\s*({operatorSymbols})\s*')

Desired output:

\s*(==|!=)\s*

I get the error:

    print(fr'\s*({operatorSymbols})\s*')
                                      ^
SyntaxError: invalid syntax

What is wrong with it?

Konrad Rudolph
  • 506,650
  • 124
  • 909
  • 1,183
Adamarla
  • 607
  • 8
  • 17

0 Answers0