Grab Everything Except the Hyphen

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.

Source: regex

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.