I want to search with grep for a string that looks like this:
something ~* 'bla'
I tried this, but the shell removes the single quotes. Argh…
grep -i '"something ~* '[:alnum:]'"' /var/log/syslog
What would be the correct search?
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.
works for me.
*to match a literal*instead of making it the zero-or-more-matches character:~*would match zero or more occurrences of~while~\*matches the expression~*aftersomething:alnum:(see example here)*after[[:alnum::]]to match not only one character between your single quotes but several of them