Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
is for patterns specifying search or replace strings. Also known as `regex` or `regexp`, the patterns describe strings to match when searching or replacing. Emacs provides extensive support for `regex` patterns in many commands. Emacs also provides an interactive expression builder for such patterns.
2
votes
use ^ inside of [] as start of line
The other answer gives you a good regexp for your problem, I just want to add a bit more information about what seems to be your confusion.
The square brackets syntax [...] means one of any of the ch …
2
votes
Removing preceding text from each line of a text
I'd use either a keyboard macro or a replace-regexp.
Keyboard macro: f3 C-a M-d C-d C-d C-n f4 then press f4 to delete the line number for each line.
This records a macro which: puts the cursor to t …
11
votes
Accepted
Regexp replacement: difference between \([[:digit:]]+\) and ([[:digit:]]+)
In emacs regular expressions (unlike most regexp engines), \( and \) are group delimiters, while ( and ) match litteral brackets.
So: \([[:digit:]]+\) matches one digit or more, that is here 123, and …
3
votes
Accepted
"Invalid use of '\' in replacement text" with non-interactive calls
(Credits go to Tobias)
replace-regexp (and query-replace-regexp) have their second read argument malaxed into a suitable form for the elisp call. In particular, in case the replacement string contain …
2
votes
1
answer
1k
views
"Invalid use of '\' in replacement text" with non-interactive calls
It seems that replace-regexp has a different behavior if called interactively and not, but I do not understand why, and how to get the wanted behavior.
What I want is the non-interactive equivalent o …