>> C = {...
'Sustainable Industrial Systems, School of Chemical Engineering and Analytical Science, The University of Manchester, Manchester, United Kingdom; Dipartimento di Scienze Agrarie e Ambientali - Produzione, Territorio, Agroenergia, Università degli Studi di Milano, Milan, Italy';
'Department of Agricultural and Environmental Sciences - Production, Landscape, Agroenergy, Università degli Studi di Milano, Via G. Celoria 2, Milano, Italy; Department of Earth and Environmental Sciences, University of Milano-Bicocca, Piazza della Scienza 1, Milano, Italy';
'Department of Land and Agriculture and Forestry Systems, University of Padua, Viale dell''Università 16, 35020 Legnaro (PD), Italy';
'Dipartimento di Agraria, University of Sassari, Sassari, Italy'};
>> M = regexp(C,'[^,]+,[^,]+(?=;|$)','match');
>> M{:}
ans =
' Manchester, United Kingdom'
' Milan, Italy'
ans =
' Milano, Italy'
' Milano, Italy'
ans =
' 35020 Legnaro (PD), Italy'
ans =
' Sassari, Italy'
8 Comments
Luna (view profile)
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/439142-how-to-extract-locations-from-strings-of-addresses#comment_659036
Guillaume (view profile)
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/439142-how-to-extract-locations-from-strings-of-addresses#comment_659037
pietro (view profile)
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/439142-how-to-extract-locations-from-strings-of-addresses#comment_659070
Bob Nbob (view profile)
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/439142-how-to-extract-locations-from-strings-of-addresses#comment_659106
pietro (view profile)
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/439142-how-to-extract-locations-from-strings-of-addresses#comment_659112
Bob Nbob (view profile)
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/439142-how-to-extract-locations-from-strings-of-addresses#comment_659157
Akira Agata (view profile)
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/439142-how-to-extract-locations-from-strings-of-addresses#comment_659827
pietro (view profile)
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/439142-how-to-extract-locations-from-strings-of-addresses#comment_659946
Sign in to comment.