I am looking to match the word as on its own and am using

(s-replace-regexp "\\<as\\>" "s" word)

Is this the way to it?

1 Answer 1


I would use "\\bas\\b" in most situations, but YMMV.

  • Do you use \\< and \\>, or do you keep with \\b for beginning and end of a word?
    – Dilna
    Aug 27, 2022 at 10:14
  • gnu manual supports your use for matching any occurrence of as as a separate word.
    – Dilna
    Aug 27, 2022 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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