Skip to main content

Questions tagged [query-replace-regexp]

Filter by
Sorted by
Tagged with
3 votes
2 answers
448 views

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" ...
pglpm's user avatar
  • 397
2 votes
0 answers
101 views

What I want A convenient way (with preview, interactivity) to replace regex multi-line matches across many files What I already have I know how to do this for single-line matches. I use counsel-rg, ...
Herman Nurlygayanov's user avatar
2 votes
1 answer
158 views

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 ...
Arch Stanton's user avatar
  • 1,856
1 vote
1 answer
140 views

I want to write a few functions that call query-replace-regexp with regex and replacement strings that are too complicated to remember and to hard to figure them out again every time I need them. For ...
Schievel's user avatar
0 votes
1 answer
109 views

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....
147pm's user avatar
  • 3,085
0 votes
1 answer
112 views

I have this function: (defun my-replacements () (interactive) (query-replace "foo" "bar" nil (point-min) (point-max)) (query-replace "baz" "quz" nil (...
Gabriele's user avatar
  • 1,720
0 votes
1 answer
126 views

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 ...
Gabriele's user avatar
  • 1,720
0 votes
2 answers
142 views

An example of this is a script to output the contents of .zsh_history file in the manner of the history command, so an emacs script would be invoked by a command line like display.sh.el < ~/....
vfclists's user avatar
  • 1,511
0 votes
1 answer
282 views

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 ~/....
vfclists's user avatar
  • 1,511
0 votes
2 answers
148 views

I want to convert the timestamps in a .zsh_history file to their readable equivalents. Does query-replace-regex or some other function provide the ability to replace the match with the value of a ...
vfclists's user avatar
  • 1,511
1 vote
1 answer
240 views

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....
pglpm's user avatar
  • 397
0 votes
2 answers
139 views

Emacs 27.1 Linux Mint 21 I have text modifyNetwork in 50 files in differents folders. I need to replace them by text performCommand. What is the easiest way to replace text in all files in all ...
a_subscriber's user avatar
  • 4,386
0 votes
1 answer
42 views

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-...
user avatar
0 votes
1 answer
128 views

I wanted to create a regex to find these dates: 1966/08/20 2023/02/12 In re-builder I was able to build this: "\([0-9]\{4\}\)/\([0-9]\{2\}\)/\([0-9]\{2\}\)" In the buffer the dates are ...
edman's user avatar
  • 1,291
0 votes
1 answer
40 views

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&...
edman's user avatar
  • 1,291

15 30 50 per page