I have a challenge where I need to eliminate the city from a city, state combination. For example, if I have the string "Portland, OR", I want to extract only "Portland". Can someone help me with a Javascript solution or guide me on how to achieve this using regular expressions?
Let's say I have a variable called myString with the value "Portland, OR".
The goal is to capture everything before the comma (excluding the comma itself).