Hey there, I'm attempting to extract the word right before a comma in a sentence.
For instance, consider the following string:
"Cloudy, and 51 ° F "
I aim to retrieve CLOUDY as the output.
Could someone guide me on how to achieve this using regex and javascript? I understand that the .match command in javascript should be used. Thank you in advance for any assistance provided.