- Nov
- 257
- 3
Can anyone tell me what I'm doing wrong with \h and \H regex matches?
First off, to confirm that character classes are working at all:
But when I try \h and \H I get a bunch of zeros. This makes little sense to me since \H should return the opposite of \h.
In fact, if I replace \h with the help file's definition (and define \H as not-the-help-file's-definition-of-\h), it works as expected:
PEBCAK or bug?
First off, to confirm that character classes are working at all:
Code:
[C:\]echo %@regex[\d,5] %@regex[\w,5] %@regex[\d,a] %@regex[\w,a]
1 1 0 1
But when I try \h and \H I get a bunch of zeros. This makes little sense to me since \H should return the opposite of \h.
Code:
[C:\]echo %@regex[\h,5] %@regex[\H,5] %@regex[\h,a] %@regex[\H,a] %@regex[\h,z] %@regex[\H,z]
0 0 0 0 0 0
In fact, if I replace \h with the help file's definition (and define \H as not-the-help-file's-definition-of-\h), it works as expected:
Code:
echo %@regex[[0-9a-fA-F],5] %@regex[[^0-9a-fA-F],5] %@regex[[0-9a-fA-F],a] %@regex[[^0-9a-fA-F],a] %@regex[[0-9a-fA-F],z] %@regex[[^0-9a-fA-F
],z]
1 0 1 0 0 1
PEBCAK or bug?