Skip to main content

New answers tagged

0 votes

How to remove trailing space from string and preserve faces

The chances of you ever needing to manipulate a string as a sequence of individual characters are extremely slim. Obviously rpluim's answer is the best one but, as an addendum, even when the exact ...
phils's user avatar
  • 53k
2 votes
Accepted

How to remove trailing space from string and preserve faces

This can be done using string-trim-right: string-trim-right is a byte-code-function in `subr.el'. (string-trim-right STRING &optional REGEXP) Trim STRING of trailing string matching REGEXP. ...
rpluim's user avatar
  • 5,585
0 votes

Match regexp groups or entire text

In emacs 29 there is a useful link to short regexp doc in the doc for match-string. There we have (and (string-match "^\\([fo]+\\)b" "foobar") (match-string 0 "foobar")) ...
DJJ's user avatar
  • 770

Top 50 recent answers are included