Closed byzheng closed 3 years ago
When typing names into the gui, we only allow letters, numbers and underscores in the model/node names. However by opening the .apsimx file in a text editor someone could type in anything they want. Also if the file is imported from old apsim, then it can have non-alphanumeric characters. I'm not sure what exactly old apsim allows but I've definitely seen hyphens and plus signs.
Thanks @hol430. That's enough information for my current task.
I am writing a regular expression to remove the last node of a path, for example, remove
LV
from[Phenology].CAMP.FLNparams.LV
to obtain[Phenology].CAMP.FLNparams
.My current regular expression is
^(.+)\\.([a-zA-Z0-9]+)$
. Do any special characters allow in the node name?