0

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.

enter image description here

Why?

2

2 Answers 2

2

Two (2) backslashes are sufficient to get the job done:

"\\([A-Z]+\\)-\\([A-Z]+\\)"
0
2

Probably you want to select the string syntax.

  (setq reb-re-syntax 'string)

re-syntax

1

Not the answer you're looking for? Browse other questions tagged or ask your own question.