in VI and man command, how to exactly match a string? I don't know how to exact match a string~

  • Do you mean match "by" in "something by something" but not in "something bytes this"? – livibetter Oct 11 '10 at 9:12

Press / and enter the regular expression for the string you want to match, then press Enter.

  • / \word\b , works, use regular expression, thanks – Foolish Oct 12 '10 at 1:22

If you mean a single word, you can use /\<word\>.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.