Questions tagged [query-replace-regexp]
The query-replace-regexp tag has no summary.
43 questions
3 votes
2 answers
426 views
How to replace any letter with the next in the alphabet?
It's Emacs, so I'm sure it's possible to do a query-replace-regexp that replaces any [a-zA-Z] letter with the following one in the alphabet, at least for ASCII letters. So for instance "sgd" ...
2 votes
1 answer
151 views
Make non-regexp searches always case insensitive and regexp searches always case sensitive
I'd like my fixed-string searches to be always case insensitive, my regexp searches to be always case sensitive, and I don't want search-upper-case to change the case of my search strings. This should ...
0 votes
1 answer
96 views
How to replace-regexp text to the head of an org-mode paragraph
M-x replace-regexp RET ^ RET your text RET will add "your text" to the start of every line of an emacs buffer, but how could I do the same to the start of every org-mode paragraph instead, i....
0 votes
1 answer
118 views
query-replace bug?
When I run query-replace* commands if I type ? I get this explanation of the function's options: Type Space or ‘y’ to replace one match, Delete or ‘n’ to skip to next, RET or ‘q’ to exit, Period to ...
0 votes
1 answer
271 views
Am I using "replace-regexp-in-string" the right way?
I want to view ~/.zsh_history files the way they are displayed by the history command with raw unixtimestamps converted to properly formatted dates. : 1568128379:0;cp -a ~/.zshrc.pre-oh-my-zsh ~/....
1 vote
1 answer
229 views
Function to replace strings from region and save result in kill-ring
I'm almost completely ignorant in elisp, but I'd like to have a function that does the following: Takes a string from (a) a region, if one is selected, or (b) user prompt, if a region is not selected....
0 votes
1 answer
39 views
Regexp for first consecutive non whitespace ending with @?
I have a mailing list whose lines contain garbage characterized by spaces, like this: bar qux [email protected] for which I want to extract [email protected]. I tried this unsuccessfully: M-x query-replace-...
0 votes
1 answer
39 views
Efficient way to change the format of a date in orgmode
enter code hereWhat would be the most efficient way to change the format of a list of dates like this in Emacs: |Bob|1966/08/20|2023/05/19| |Janice|1964/09/18|2023/05/19| To this: |Bob|<1966-08-20&...