Ticket #47537

strmatch

Date d'ouverture: 2023-03-08 02:08 Dernière mise à jour: 2023-05-08 00:09

Rapporteur:
Propriétaire:
(Aucun)
Type:
État:
Atteints
Composant:
Jalon:
(Aucun)
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Invalid
Fichier:
Aucun
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Détails

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

Ticket History (3/3 Histories)

2023-03-08 02:08 Updated by: vatiacg
  • New Ticket "strmatch" created
2023-03-08 07:27 Updated by: nmaya
Commentaire

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'
2023-05-08 00:09 Updated by: nmaya
  • État Update from Ouvert to Atteints
  • Résolution Update from Aucun to Invalid

Attachment File List

No attachments

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion