From: Jean Louis <bugs@gnu.support>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: SOLVED - Re: Strange whitespace remains after emoji regexp replace
Date: Wed, 25 Dec 2024 16:44:25 +0300 [thread overview]
Message-ID: <Z2wMOZJ-oVxLvyVN@lco2> (raw)
In-Reply-To: <86cyhg0vub.fsf@gnu.org>
* Eli Zaretskii <eliz@gnu.org> [2024-12-25 15:53]:
> > The difference to normal space is that it has some ️ (#xfe0f)
> > VARIATION SELECTOR-16
> >
> > But I don't want it. I want to clean EVERYTHING what is not
> > alpha-numeric from the string.
> >
> > How do I make sure of it?
>
> Remove the VS-16 character as well, how else?
For you natural, for me mystery, though thanks 🙏👍💬, I got it now
after all.
I have found the answer online, that it is special character 📝 \uFE0F
and without online assistance, I would never find it. 💻
(defun wrs-search-clean-entry (entry)
"Clean and normalize a ENTRY string.
Prepare it for easier searching"
(let* ((entry (replace-regexp-in-string (rx (one-or-more (or (not alnum) "\n" blank))) " " entry))
(entry (replace-regexp-in-string "[\u200B-\u200D\uFEFF\uFE0F]" " " entry))
(entry (replace-regexp-in-string (rx (one-or-more " ")) " " entry))
(entry (string-trim entry)))
entry))
It is \uFE0F
Problem solved for now! 🙌
Thanks much! 😊
Jean Louis
prev parent reply other threads:[~2024-12-25 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-25 11:38 Strange whitespace remains after emoji regexp replace Jean Louis
2024-12-25 12:51 ` Eli Zaretskii
2024-12-25 13:44 ` Jean Louis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z2wMOZJ-oVxLvyVN@lco2 \
--to=bugs@gnu.support \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.