Something like this should do it. The unescaped parentheses define groups which 
are referred to by \1 and \2 in the replacement pattern. The escaped 
parentheses match the actual parentheses around the coordinates.

Find: \(([0-9.-]+), ([0-9.-]+)\)
Replace: <Point><coordinates>\2,\1</coordinates></Point>

Hope this helps,

[fletcher]


> On Mar 5, 2018, at 1:49 PM, Steve Wilson <swil...@star-telegram.com> 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
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com.
> To post to this group, send email to bbedit@googlegroups.com.
> Visit this group at https://groups.google.com/group/bbedit.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to