I was looking for how to validate a layer name ...
... What characters are exluded from use.
Apart from trimming white spaces at beginning and end ...
Found
Code: Select all
new RegExp("[^<>/\\\\\":;\?\*|,=`]{1,255}");
255 characters long.
Are these all the restrictions on a layer name?
Regards,
CVH
PS:
The 5x backSlash looked odd, https://regexr.com/ explains it as twice the backSlash character :
Found the combination "\\\\\" at 3 places:
BlockDialog.js
LayerDialog.js
PropertyEditor.js (here the slash is allowed)