I want to search for this:
SELECT * FROM `influencers` WHERE (author_name =
within a log file using vi, I cant figure out how to properly escape this, I have tried:
SELECT * FROM \`influencers开发者_StackOverflow\` WHERE \(author_name =
And several similar versions, but no luck
In vim, the only character you need to escape is the *
:
/SELECT \* FROM `influencers` WHERE (author_name =
If you're using a different vi variant than vim, you'll need to tell us what you're using.
This should work:
SELECT \* FROM `influencers` WHERE [(]author_name =
EDIT: Seeing Keith's answer, he's right. My square brackets are unnecessary. But I'll leave my answer to make a point: whenever I have regex problems, wrapping questionable characters in square brackets is often a quick fix (and doesn't hurt).
精彩评论