what is a regex to find any text that has ‘abc’ but does not have a ‘\’ before it. so it should match ‘jfdgabc’ but not ‘asd\abc’. basically so its not escaped.
Share
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.
Use:
This is a negative lookbehind. Basically this is saying: find me the string “abc” that is not preceded by a backslash.
The one problem with this is that if you want to allow escaping of backslashes. For example:
(ie the backslash is escaped) then it gets a little trickier.