Want to disallow dashes in text field. Am I missing something?

I have a simple text field and want to not allow dashes (-). I have set a regex of /[^_]/g which works on regex101.com but it doesn’t do anything. I can still put dashes in the text field and save. Am I missing something?

System Information
  • Strapi Version: v3.6.8
  • Database: MongoDB
  • Node Version: v14.16.0

Try with a $ at the end.
and you don’t need to add the open/close indicators of the regex