-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
Description
I was just wondering whether there was a reason for using the regular expression ^\s*m(.*)s(.*)i(.*)\s*$ to determine whether a string contains a STASH code (see
https://github.com/SciTools/iris/blob/master/lib/iris/fileformats/pp.py#L308), rather than something more explicit like ^\s*m(\d{2})s(\d{2})i(\d{3})\s*$ (or even ^\s*m(\d*)s(\d*)i(\d*)\s*$)? I have a case where the string I was checking contained the netCDF variable name mlotstmin, which matches with the current regular expression, even though it is not a STASH code!