0

I want to generate a regex that will allow the exact string "[TEST]". What is the required regex?

Thanks.

Cœur
  • 37,241
  • 25
  • 195
  • 267
IsaacE
  • 305
  • 2
  • 10

1 Answers1

1

The correct way to do this is as follows:

"\\[TEST\\]"

→ double escape each square bracket

ssc-hrep3
  • 15,024
  • 7
  • 48
  • 87
IsaacE
  • 305
  • 2
  • 10