Hello, @peterjones,
In my previous post, I forgot to mention the ^ character, which has a special meaning within a Character class !
So, here is an updated version of my previous post :
If we consider the following CHARACTER CLASS structure :
[.......]
123456789
The POSSIBLE location(s), in order to find the LITERAL character below, are :
LITERAL Character [ : POSSIBLE at any position, BETWEEN 2 to 8
POSSIBLE at any position, BETWEEN 2 to 8, if PRECEDED with an ANTI-SLASH character
LITERAL Character ] : POSSIBLE at position 2 ONLY
POSSIBLE at any position, BETWEEN 2 to 8, if PRECEDED with an ANTI-SLASH character
LITERAL Character - : POSSIBLE at position 2
POSSIBLE at position 8
POSSIBLE at any position, BETWEEN 2 to 8, if PRECEDED with an ANTI-SLASH character
LITERAL character ^ : POSSIBLE at any position, BETWEEN 3 and 8
POSSIBLE at any position, BETWEEN 2 to 8, if PRECEDED with an ANTI-SLASH character
LITERAL Character \ : POSSIBLE at any position, BETWEEN 2 to 8, if PRECEDED with an ANTI-SLASH character
And I suppose that @alan-kilborn could add :
To use a “literal ^” in a character class: Use it directly like any other character, e.g. [ab^c], but right after the opening [ of the class notation ; “escaping” is not necessary (but is permissible), e.g. [ab\^c]
Best Regards,
guy038