On 05.03.18 22:49, Steve Wilson wrote:
> Need help trying to figure out how to do a grep search and replace in BBEdit
> of a couple of coordinates into KML.
> Unfortunately the order of the lat/long needs to be flipped.
> Here is what it looks like:
>
> (32.839098817184, -97.303764761793)
>
> And I need it to look like this:
>
> <Point><coordinates>-97.303764761793,32.839098817184,0.0</coordinates></Point>
>
> Thanks for any help
>
Hello Steve!
I don't know, whether there are some more characters around your data.
If the coordinates are pure one per line, this should work with grep:
search:
^(-?\d\d\.\d{12}),\s*(-?\d\d\.\d{12})\s*$
replace:
<Point><coordinates>\02,\01,0.0</coordinates></Point>
best greetings
marek
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.