Regex, match when there is dash with spaces before and after : Hy guys. I would need a help with writting a regex.

I need it to match only when there is a dash detected with spaces before and after. For example:

    "first - place" 

I would also need an separate example when there is dash detected with just one space and no space after, for example:

    "first -place"