New ARI warning Wed Oct 2 01:56:22 UTC 2019
Simon Marchi
simark@simark.ca
Wed Oct 2 17:39:00 GMT 2019
On 2019-10-02 1:35 p.m., Tom Tromey wrote:
> I believe that in most regexp syntax, a "]" doesn't need to be quoted in
> a character class, provided it is either the first character (like
> "[]...]") or comes immediately after the "^" (like "[^]...]").
>
> The gawk manual mentions this, though it does also recommend using
> backslash, so maybe I should just do that.
>
> (info "(gawk) Bracket Expressions")
>
> To include one of the characters '\', ']', '-', or '^' in a bracket
> expression, put a '\' in front of it. For example:
>
> [d\]]
>
> matches either 'd' or ']'. Additionally, if you place ']' right after
> the opening '[', the closing bracket is treated as one of the characters
> to be matched.
Well, as long as the regex does what it is meant to do, I am fine with it.
I just thought that it would be nice to have a small comment that explains
what it does, prevent using %p to print raw pointers, but allow the gdb
extensions.
Simon
More information about the Gdb-patches
mailing list