help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Difference between \\w and [:word:]?


From: Eric Abrahamsen
Subject: Difference between \\w and [:word:]?
Date: Thu, 07 Jun 2018 12:18:53 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Can someone explain to me what's happening here? What's the difference
between \\w and [:word:], inside and outside of a bracket construction?

(setq case-fold-search nil)
(string-match-p "[:word:]" "P") => nil
(string-match-p "[[:word:]]" "P") => 0
(string-match-p "\\w" "P") => 0
(string-match-p "[\\w]" "P") = nil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]