I want a regex that matches a square bracket [. I haven't found one yet. I think I tried all possibilities, but haven't found the right one. What is a valid regex for this?
[
How about using backslash in front of the square bracket. Normally square brackets match a character class.
2.1m questions
2.1m answers
60 comments
57.0k users