(Note: At this point, $lat and $long are still strings rather than numbers, so you wouldn’t be doing math with them directly. Converting to numeric types is easy, so long as the data is valid, but you might want some better parsing / validation code to make sure of that first.)
First use RegEx to do pattern matching on your string. I’m using labeled capture to easily get that section of the pattern match later from the automatic $matches variable that is populated when you use the -match operator.