On Wed, 19 Nov 2025 14:52:27 +0100, Filip Schauer wrote:
> Changed in v2:
> * remove unnecessary backslashes from regex ("\\/" becomes "/")
> * ran `make tidy`
>
> Filip Schauer (2):
> ui: storage oci pull: optimize reference regex
> ui: storage oci pull: split up long one-line regex
>
> [...]
Applied, thanks!
But maybe it would be more readable by using (string) variables for
the parts and re-use them where applicable when concatenating the full
string for the expression. Or is there a better way to build regexes
in JavaScript from smaller parts?
E.g. '[a-zA-Z\\d](?:[a-zA-Z\\d-]*[a-zA-Z\\d])?' could be a variable
and '[a-z\\d]+(?:(?:[._]|__|-+)[a-z\\d]+)*' could be one, both being
used twice if I'm not misreading it. And more could make sense like
'\\w[\\w.-]{0,127}' just to give that part a name too when
constructing the full regex.
[1/2] ui: storage oci pull: optimize reference regex
commit: 9fe9aa05f70cdaf98fa0c51d233125beb0467f2c
[2/2] ui: storage oci pull: split up long one-line regex
commit: d336324550daadb28f4fedbd8f05dbcb53427cc2
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel