0

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

0

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

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

Your Answer

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

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