JavaScript regular expression for word boundaries, tolerating in-word hyphens and apostrophes
<p>I'm looking for a Regular Expression for JavaScript that will identify word boundaries in English, while accepting hyphens and apostrophes that appear inside words, but excluding those that appear alone or at the beginning or end of a word.</p>

<p>For example, for the sentence ...<br>
  She said  - 'That'll be all, Two-Fry.'<br>
... I want the characters shown in grey below to be detected:<br>
  She<code></code>said<code>- '</code>That'll<code></code>be<code></code>all<code>,</code>Two-Fry<code>.'</code>  </p>

<p>If I use the regex <code>/[^A-Za-z'-]/g</code>, then "loose" hyphens and apostrophes are not detected.<br>
  She<code></code>said<code></code>-<code></code>'That'll<code></code>be<code></code>all<code>,</code>Two-Fry<code>.</code>'</p>

<p>How can I alter my regex so that it detects apostrophes and hyphens that don't have a word character on both sides?</p>

<p>You can test my regex here: <a href="https://regex101.com/r/bR8sV1/2" rel="nofollow">https://regex101.com/r/bR8sV1/2</a></p>

<p>Note: the text I will be working on may contain other writing scripts, like руский and ไทอ so it will not be feasible to simply include all the characters that are not part of any English word.</p>