title: Detecting specific string whether in start, middle or end of a string with Regular Expressions
body: <p>I've been reading some Q&amp;A about regular expressions but I haven't found that answer my question. I'll be using ra as the searched string.</p>
  
  <p>My problem is that I want to find the string 'ra' in any string, 'ra' will be replaced with 'RA', but the thing is that I just want to replace 'ra' as long is not part of any other word, for example: order_ra replaced to order RA but camera cannot be replaced with cameRA.</p>
  
  <p>I tried all ready with <code>[\s|_]ra(?:[\s|_])</code> and does not work, because is looking for anything like order_ra or order ra with an space at the end. I would like to match order ra or order_ra either it has a white space after it or not. Can anyone help me on this? I'm not too literate with regular expressions.</p>
  
  <p>The reason I'm needing this is because I want to capitalize 'ra' dynamically in a string sent by a user interaction but not if belong to a word like came*<em>ra</em>* or *<em>ra</em>*dical. I don't know if I explain myself clearly, excuse me if I'm not.</p>