Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to find a regex that will search for a string in Graylog2:

access denied

For example, I want to search for the string:

Login failed: Access Denied

I have tried:

\Qaccess denied\E

But this matches all strings with "access" and "denied".

share|improve this question
1  
The regex to find "access denied" is access denied. Where are you even trying that? Which OS are you on and what tool do you use? – slhck Jun 12 '12 at 11:54
    
I am using it for graylog2, but when I simply enter "access denied" it matches all strings will "access" and "denied" – Jay Jun 12 '12 at 11:56
    
Have you tried "access denied"? What you are describing sounds more like a standard search, where quotation marks are often used for grouping. RegEx searches should not separate parts of the search string. – Bob Jun 12 '12 at 12:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.