-2

Is there any way to make something.+()[]* matching literally 'something.+()[]*'? I'm using regex builder so manual escaping is not allowed. Sure, i can add hardcoded checks if (char === '+') return '\+' but i'm looking for native solution or better way

UPD

I'm sorry. I forgot to add that matching should be in given order with moving forward but not back. So [+.] will not fit my requirements because it will match both +. and .+. I need only first case (In definition order)

IC_
  • 1,624
  • 1
  • 23
  • 57

1 Answers1

0

You don't need to escape them if within square brackets.. I just tested and works for me, but maybe not what you are looking for?

something[.+()[]]
curv
  • 3,796
  • 4
  • 33
  • 48