I have some input strings where I want to just get the city names (Brighton, Singapore, Austin, San Francisco)
Brighton, United Kingdom
Singapore
Austin, TX, USA
San Francisco, CA, USA
I've tried doing this regex (.*),?
but it matches the whole string, disregarding the comma. How can I only match up till the first comma if it exists?