I am trying to match a line looking like this
(white space)ERROR(some text)(new line)
(some text)
What I have tried is a regex like this and is not working
if (/\sERROR(.*)(\n.*)/){
}
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.
Print
$_beforeif.are you sure that your string starts with a single white space? If not, you need
\s*instead of\s.embedded newlines are rare, are you sure you actually do have it there? If yes, you will need the
smodifier after the last/.If all else fails, read the manual.