[pve-devel] [PATCH v3 storage 2/3] Incorporate wipe_disks from PVE::Ceph::Tools

Dominik Csapak d.csapak at proxmox.com
Thu Apr 16 08:57:42 CEST 2020


> 
> 
> 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




More information about the pve-devel mailing list