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

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

Re: Shortening words in region


From: Jean Louis
Subject: Re: Shortening words in region
Date: Sat, 13 Aug 2022 20:42:22 +0300
User-agent: Mutt/+ () (2022-06-11)

* uzibalqa via Users list for the GNU Emacs text editor 
<help-gnu-emacs@gnu.org> [2022-08-13 19:34]:
> Have been working on shortening words. But doing so on a word by
> word basis is quite slow. Thusly I am writing a version that accepts
> a selected region.
> 
> This function uses a selected region, then changes initial parts oy
> words (replacing matching cog, col, com, con, cor, coun, and cum
> with the letter "k".

(rx (zero-or-more (or "col" "cog" "com" "con" "cor" "coun" "cum"))) ⇒ 
"\\(?:c\\(?:o\\(?:un\\|[glmnr]\\)\\|um\\)\\)*"

{C-h f rx RET}

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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