I need to extract the value (47.4255778) for key (latitude) from a longtext field of a MySQL database. I think this could be possible with a RegEx construct, but I can’t wrap my head around it. Any idea, anyone?
The text can be as follows:
a:17:{s:6:“status”;s:1:“1”;s:10:“place_name”;s:17:“Laufenstrasse 261”;s:13:“street_number”;s:3:“261”;s:11:“street_name”;s:13:“Laufenstrasse”;s:6:“street”;s:17:“261 Laufenstrasse”;s:9:“street_bw”;s:17:“Laufenstrasse 261”;s:4:“city”;s:12:“Kleinlützel”;s:6:“county”;s:10:“Thierstein”;s:11:“region_code”;s:2:“SO”;s:11:“region_name”;s:9:“Solothurn”;s:8:“postcode”;s:4:“4245”;s:12:“country_code”;s:2:“CH”;s:12:“country_name”;s:7:“Schweiz”;s:7:“address”;s:31:“Laufenstrasse 261, Kleinlützel”;s:17:“formatted_address”;s:36:“Laufenstrasse 261, 4245 Kleinlützel”;s:8:“latitude”;s:10:“47.4255778”;s:9:“longitude”;s:17:“7.417047600000001”;}
I need select the values for latitude and also for longitude out of this chunk of text.