Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
"geo":\{"type":"Point","coordinates":\[(?P<latitude>[^,\]\}]+),(?P<longitude>[\d\.\-]+)
/

Description

This extracts latitude and longitude from a Tweet pulled through the public API.

Submitted by Ed Fullman - 8 years ago