What is regex for square bracket character in javascript

Viewed 36

Can anyone tell me how to make regex for square brackets ( [ ] ) in JavaScript?

1 Answers

You need to escape the square brackets with a backslash: \[\]

Related