Regex to identify invalid URL slugs

I am struggling to find a regex that will identify invalid URL slugs. I often have revisions tasks where the translators add apostrophes or accented letters in the URL slugs and I keep removing them manually. I’d like to improve my workflow and spot the erroneous characters automatically.

A valid URL slug is composed of number, letters and hyphens (or underscore, depending on the chosen variant). Nothing else. Thus the regex for valid URL slugs is fairly simple in Studio:

Now, where I am struggling is

  1. to adapt this regex for XBench
  2. to negate this expression for the target search