Module:Ordnance Survey coordinates/sandbox: Difference between revisions

Content deleted Content added
even stricter
will module work without numbers?
Tag: Reverted
Line 274:
ngr = mw.ustring.gsub(mw.ustring.upper(ngr),"[%s%p]","")
local first, last, lett, num = mw.ustring.find(ngr,"^([A-Z]+)(%d+)$")
if first == nil or empty(lett) or empty(num) or mw.ustring.len(lett) > 2 then
return nil,"Malformed NGR",0.0,0.0
end