Skip to main content
edited body
Source Link
Drew
  • 79.1k
  • 10
  • 123
  • 257

Use the character class [:alpha:]

E.g. [[:alpha:]]+ to match one-or-more such characters.

C-hig (elisp)Char Classes says:

[:alpha:]

This matches any letter. For multibyte characters, it matches characters whose Unicode ‘general-category’general-category property (*note Character Properties::) indicates they are alphabetic characters.

Whereas you were using:

[:word:]

This matches any character that has word syntax (*note Syntax Class Table::).

Use the character class [:alpha:]

E.g. [[:alpha:]]+ to match one-or-more such characters.

C-hig (elisp)Char Classes says:

[:alpha:]

This matches any letter. For multibyte characters, it matches characters whose Unicode ‘general-category’ property (*note Character Properties::) indicates they are alphabetic characters.

Whereas you were using:

[:word:]

This matches any character that has word syntax (*note Syntax Class Table::).

Use the character class [:alpha:]

E.g. [[:alpha:]]+ to match one-or-more such characters.

C-hig (elisp)Char Classes says:

[:alpha:]

This matches any letter. For multibyte characters, it matches characters whose Unicode general-category property (*note Character Properties::) indicates they are alphabetic characters.

Whereas you were using:

[:word:]

This matches any character that has word syntax (*note Syntax Class Table::).

Source Link
phils
  • 53k
  • 3
  • 84
  • 127

Use the character class [:alpha:]

E.g. [[:alpha:]]+ to match one-or-more such characters.

C-hig (elisp)Char Classes says:

[:alpha:]

This matches any letter. For multibyte characters, it matches characters whose Unicode ‘general-category’ property (*note Character Properties::) indicates they are alphabetic characters.

Whereas you were using:

[:word:]

This matches any character that has word syntax (*note Syntax Class Table::).