/[^\\]\]/
What does this regex match to?
Trying to match “]” somehow. I am not sure how exactly.
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It matches any single character that isn’t a backslash
\, followed by a closing square bracket].These strings match:
These strings don’t match:
If you’re trying to match a
]as long as it’s not preceded by a\, use a negative lookbehind assertion instead of a negative character class:(or see comments)