Linked Questions

0
votes
0answers
21 views

Matches from re-builder different from re-search-forward and search-forward-regexp due to double backslash [duplicate]

Following Org mode refiling gobbles a newline and absorbs the next heading where Org mode refiling has gobbled some of the next heading, I want to search for those gobbled headings where the stars are ...
5
votes
2answers
18k views

Escaping brackets in regexp

I tried these two, but none of them worked. (if (looking-at "\[") (insert "f")) (if (looking-at "[") (insert "f")) How can I escape square brackets in emacs regexp?
4
votes
2answers
841 views

How can I add a compilation error regex for node js?

I can't seem to get emacs to recognize node stacktraces. As you can see, I've added what I think is a valid regular expression to compilation-error-regex-alist and compilation-error-regex-alist-alist, ...
2
votes
1answer
392 views

calling search-forward function with ^ and $ in the regexp pattern

I want to create a table in org-mode and use it in Ditaa The following function is created to replace “^+-” to “|-” and similarly, “^-+\s-*” to “-|”. Surprisingly, this does not work. (defun ditaa-...
2
votes
1answer
353 views

Replacing a string with symbols using font-lock?

I'm trying to make a font lock hook to replace strings of text for a mathmatical notation plugin. So I'm thinking " / " (note the spaces) will turn into " ÷ ", but "/" won't. (It's a package mainly ...
2
votes
1answer
280 views

Tramp Unable to Recognize Remote Prompt

I have been trying to get tramp working and I am having issues with recognizing the remote prompt. Unfortunately, I cannot change the remote prompt because it is dictated by my school. I have tried ...
0
votes
2answers
75 views

regexp-builder - no match with correct regexp. Why? [duplicate]

In buffer I has text "ADA-SGD" "ADT-SGD" "ADX-SGD" "AID-SGD" "AMP-SGD" "ANT-SGD" "ARDR-SGD" "ARK-SGD" M-x regexp-builder Input regexp: "\([A-Z]+\)-\([A-Z]+\)" But I get message: No match. Why?
-1
votes
1answer
158 views

How to find all characters, newlines included?

I have this LaTeX code: %%% 10 \bibitem{bib2} W.~Kockelmann, G.~Burca, J.F.~Kelleher, S.~Kabra, S.-Y.~Zhang, N.J.~Rhodes et~al., \emph{Status of the neutron imaging and diffraction instrument IMAT},...
0
votes
1answer
157 views

re-search-forward Regex behavior for OR boolean

We usually use \| to depict OR in Regex. Using a\|b as input to Regexp I-search and Occur both gave the desired result. But re-search-forward seems unable to recognize this notation. abcdcba (re-...
1
vote
2answers
96 views

compilation-mode and next-error confusion

I'm going crazy trying to understand why compilation mode and next-error recognize some errors and not others. It appears as though we're long past the days of simple regexps for recognizing errors ...
1
vote
1answer
154 views

How to paste a multiline regex from re-builder into `replace-regexp`

I built with M-x re-builder a regex to match empty quoted lines in emails. In read syntax it is: "^>\\s-*\n>" How can I copy this regex in re-builder, so that I can paste it in the first ...
0
votes
2answers
85 views

Removing and adding newlines around expressions

I am in the process of formatting a couple of hundred markdown files and am trying to automate that process. I am having two problems, but I guess I can ask two questions ;) Goal I am trying to ...
0
votes
0answers
66 views

Has matches , but re-builder print “No matches”

Emacs 26.1 In scratch buffer I has text KRW-EOS hel-how hello-how-ar h-privet kak-del 123-567 aaa-bbb AAA-BBB AAAA-BBBB AAA-BB AA-BBB A-A AAAAAAAAAA BBBBBB AAA BBB ZZZ-YYY M-x regexp-builder Input ...
0
votes
1answer
31 views

Help with regex in re-builder : lines without “|” nor “;” at the beginning

I am starting regex with Emacs and cannot get the right regex. I would like to match the line 1 and 4 in the image below, where variable-pitch is "active" and do not match 2 and 3 where is &...