0

In (my) XEmacs 21.4, describe-variable for gdb-prompt-pattern gives:

Value: "^>\\|^(.*gdb[+]?) *\\|^---Type <return> to.*--- *"

What is the "[+]" in there? Does it just mean "the + character"? If so, why not use "\+"?

John H.
  • 1,551
  • 1
  • 12
  • 18

2 Answers2

3

In your context, [+] is the same as \+, that is matching the + character, and I imagine the original writer of that regexp either did so for readability reasons, or perhaps because [+] used to be in the past some set of chars like [-+]

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547
1

in regular expression [+] is symbol +

any symbol in [] is symbol except -

burning_LEGION
  • 13,246
  • 8
  • 40
  • 52