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?

a_subscriber
  • 4,062
  • 1
  • 18
  • 56

2 Answers2

2

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

"\\([A-Z]+\\)-\\([A-Z]+\\)"
lawlist
  • 19,106
  • 5
  • 38
  • 120
2

Probably you want to select the string syntax.

  (setq reb-re-syntax 'string)

re-syntax

phils
  • 50,977
  • 3
  • 79
  • 122
gigiair
  • 2,166
  • 1
  • 9
  • 15