New answers tagged string
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 ...
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.
...
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"))
...
Top 50 recent answers are included
Related Tags
string × 160regular-expressions × 20
replace × 12
text-properties × 11
list × 10
elisp × 8
org-mode × 7
buffers × 7
characters × 7
symbols × 6
syntax-highlighting × 5
interactive × 5
numbers × 5
search × 4
variables × 4
syntax × 4
equality × 4
org-agenda × 3
faces × 3
files × 3
major-mode × 3
region × 3
display × 3
insert × 3
print × 3