Using a regular expression I want to grab all text before the
-. My below regex can successfully grab the text I want but it also grabs the hyphen. How can I stop this?
For “abc – def” it returns “abc -” but I am attempting to get “abc “. I am performing this regex in Python.