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

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

Re: Regexp capturing unicode characters


From: uzibalqa
Subject: Re: Regexp capturing unicode characters
Date: Fri, 02 Aug 2024 08:03:01 +0000

On Friday, August 2nd, 2024 at 5:44 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Thu, 01 Aug 2024 19:44:18 +0000
> > From: Heime heimeborgia@protonmail.com
> > Cc: help-gnu-emacs@gnu.org
> > 
> > On Friday, August 2nd, 2024 at 5:46 AM, Eli Zaretskii eliz@gnu.org wrote:
> > 
> > > Once again, [:alpha:] and [:alnum:] will match letters and digits in
> > > any language, not just in English.
> > > 
> > > > > The useful information is already there (including a cross-reference
> > > > > to a detailed description of what "multibyte" means). I just
> > > > > translated it into simpler terms, based on what you told about the job
> > > > > you want to do, to save you from the need to read that if you don't
> > > > > want to.
> > > > 
> > > > A mention that [:multibyte:] is not used much nowadays.
> > > 
> > > That's not what I said. I said it is almost never the right thing
> > > nowadays, especially in your case.
> > > 
> > > I'm trying to help you by saying simplified things. The manual
> > > doesn't simplify, because it's a reference.
> > 
> > Would graph [:graph:] be the most powerful ?
> 
> 
> [:graph:] includes punctuation and other symbols, which AFAIU you
> don't want to match (since you thought [:word:] is what you need).
> 
> > In "34.2 Disabling Multibyte Characters", it is stated
> > 
> > "Multibyte mode allows you to use all the supported languages
> > and scripts without limitations."
> 
> 
> That's not really relevant to the issue at hand. Yes, multibyte
> characters are needed to support all the languages. No, that doesn't
> mean you need to use [:multibyte:], because that will match
> punctuation, symbols, non-ASCII control and whitespace characters,
> etc., and you don't want that. OTOH, [:multibyte:] doesn't match
> ASCII letters and digits, and you certainly do want to match them.
> 
> > Yet you say that it is never the right thing especially in my case.
> > Where in my case I want to support languages without limitations.
> 
> 
> Yes, and [:alpha:] and [:alnum:] support languages without
> limitations. As I already told you several times.
> 
> > I did not find the reference is enough to decide what is appropriate
> > to use for languages without limitations, or for specific languages.
> > Mainly because I would not know what the classes include exactly.
> 
> 
> I tried to help you with specific advice, but you insist on not
> listening. So this will be my last message in this thread.

I listen, but also wanted reason so I can reach the same conclusion.
I accept the elaboration, which I could not conclude by myself
based only on the manual descriptions.  That was all it was about.

Then there is ".*" which is very broad and flexible. It can match spaces, 
punctuation, and special characters.  Would this constitute the broadest 
thing ?  I am using to pick on anything.  
 





reply via email to

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