strmatch
Hello.
I would like to use strmatch to find '.' character in a string. strmatch '0 1.:23.:45.:67.:89.:a b' #46 But result will be always: 1
I tried '.' and #46 ASCII version too. With other characters it works and it tells the first position of the string what it founds.
I think it is a bug.
Best regards,
Tibor
Hi,
In Regular Expression, '.' matches any character.
cf. https://github.com/kkos/oniguruma/commit/9abbf54a3a12e3c637766813a6d58e71bc5a7cc5#diff-8a4fca15b4e397422096d6e0b219c3a97bf2f1efcb4485e12346c31cc0b33d8cL48
You have to escape it to match '.'.
strmatch '0 1.:23.:45.:67.:89.:a b' '.' messagebox result 'not escape' strmatch '0 1.:23.:45.:67.:89.:a b' '\.' messagebox result 'escape'
Hello.
I would like to use strmatch to find '.' character in a string. strmatch '0 1.:23.:45.:67.:89.:a b' #46 But result will be always: 1
I tried '.' and #46 ASCII version too. With other characters it works and it tells the first position of the string what it founds.
I think it is a bug.
Best regards,
Tibor