title: Regex alphanumeric, punctuation as 1 word
body: <p>I am matching each words against identical paragraph words.</p>
  
  <p><strong>Update 1</strong>: I realise just accepting punctation you need does not solve this issue. </p>
  
  <p>Example 'hello-' and 'hello' , are consider seperate word.</p>
  
  <p>Is there a way to remove punctuation before and after word and stand alone punctuation? Only allow punctutation within word. </p>
  
  <pre><code>$string="_ - – hello’ hello' hello, hello- world. he,llo hello-world hello_world hel-lo-world hello9world"; 
  </code></pre>
  
  <p>The output should be </p>
  
  <pre><code>hello hello hello hello world he,llo hello-world hello_world hel-lo-world hello9world
  </code></pre>
  
  <p>Only word or punctuation within word </p>
  
  <p><strong>Update 2</strong>: If word only or punctuation within word, decimal number will have issue.</p>
  
  <p>1.0 still ok, .1 as punctuation remove before and after, will become 1 instead of 0.1 </p>
  
  <p><strong>Update 3</strong>: With accepting punctuation in word,
  Substrings start or end with a letter or a number will have issue.
  20-year-old will become '20-' 'year-old'. </p>
  
  <p>Thanks mickmackusa.</p>