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 "\+"?
in regular expression [+] is symbol +
[+]
+
any symbol in [] is symbol except -
[]
-
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 [-+]
\+
[-+]
Copyright © 2021 Jogjafile Inc.
in regular expression
[+]
is symbol+
any symbol in
[]
is symbol except-