You are viewing a single comment's thread. Return to all comments →
TypeScript or JavaScript
function main() { const regex = /^\([-+]?(((\d|[0-8]\d)(\.\d+)?)|(90(\.0+)?)),\s[-+]?(((\d{1,2}|1[0-7]\d)(\.\d+)?)|(180(\.0+)?))\)$/; for (let i = 1; i < inputLines.length; i++) { const str = inputLines[i]; if (regex.test(str)) { console.info('Valid'); } else { console.info('Invalid'); } } }
Seems like cookies are disabled on this browser, please enable them to open this website
Detecting Valid Latitude and Longitude Pairs
You are viewing a single comment's thread. Return to all comments →
TypeScript or JavaScript