Test, validate and match regular expressions
Matches coordinate pairs in geoJson-style arrays, capturing the two values while ignoring surrounding brackets and trailing commas. Useful for extracting longitude/latitude numbers from [lon, lat] structures and converting them to simpler formats like 'lon,lat' or 'lat,lon'. Handles nested brackets and multiple closing delimiters with global and multiline flags.