title: How to check if character is part of a word
body: <p>I've searched around here about this topic, suggestions that i saw are from topics like</p>
  <blockquote>
  <p>Check if a character is a word boundary</p>
  </blockquote>
  <p>but i don't know if that's what i need exactly</p>
  <p>My problem is this, I have to extract a string from word which can be a single character but also can be multiple, in this question I'm only discussing single character because that's the main problem in my situation, other types where string is multiple characters is easily identifiable because there's only one encounter for it in the string where I'm removing it from</p>
  <pre><code>&quot;S Shoulder Pads&quot;
  </code></pre>
  <p>In this example i have to remove character <code>S</code> from this string, problem is data is not really consistent, So <code>strpos()</code> or <code>strrpos()</code> don't always work. this same string can be provided reversed and because of this i can't consistently know where my needed character is located at</p>
  <pre><code>&quot;Shoulder Pads S&quot;
  </code></pre>
  <p>My only validation for the single character string that i need to extract is, if character is a single letter and it's not a part of any word in this example <code>S</code> then it's valid for removal. is there some nice way of doing this in PHP?</p>