Thanks for clearing that up, I mostly poked at it as Dominic came to me
asking what to do as you told him to use [0-9] and Fabian told him to go
back again, not knowing about your suggestion.

The question is, does the matching of other digit really matters at all?

I mean it naturally depends on what happens whit the parsed data, but most
of the time it should not really matter at all, or?


no, most of the time it should not matter at all, but we do parse api
parameters with decode('utf8', $v) so there is probably some
path where this could happen...

mostly i wanted to avoid introducing errors by copy/pasting regexes.
i really have no idea if this could hit us at all, but
we use regexes very often and are not very consistent
with \d and [0-9]

this is something we should decide on and put it in the style guide

bottom line: i guess both are ok when used right, but with
[0-9] there is no ambiguity as to what it matches

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to