[^...] - question about wildcard

[^…] : do you guys know some details of how to use this wildcard? I still not getting how to use it after looking up user manual

What should the wildcard actually match?

In regular expressions, [^…] is a negative character class.

For example
[^1] matches everything that is not the digit 1
[^a-zA-Z] matches everything that is no ASCII letter (beware: à, ç, ü etc. are not part of this character class)

This construct is often used to limit the range of a previous match, e.g.
\d+[^0-9] matches at least one digit followed by a non-digit.

You’ll find a lot of stuff online regarding regular expressions.

The wildcards used by the search index are not regular expressions, therefore the last example does not work in this case.

thanks for the revert. ok… I see. btw, do you know the meaning of “…” in [^…]? “…” is indicating what?

The ellipses here just indicates what you’d be excluding, e.g., [^ABC] would exclude A, B, or C.

1 Like

simple enough!!! thanks.

You’re welcome. :slight_smile:

1 Like