Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
(?<=gps.longitude)(\s*)(:\s)(?<lon>.*)\n.*(?<=gps.latitude)(\s*)(:\s)(?<lat>.*)
/
gm

Description

groups latitude and longitude values from the return of "mmcli -m 0 -K --location-get"

Submitted by anonymous - 2 years ago