title: QRegularExpression match pattern
body: <p>I want to <strong>QRegularExpressionMatch</strong> returns true in the following cases:  </p>
  
  <ul>
  <li>The string <strong>starts</strong> with FO . "<em>There is one space after FO</em>"</li>
  <li>The string <strong>starts</strong> with @FOOB.</li>
  <li>The string <strong>contains</strong> FOOBAR.  </li>
  </ul>
  
  <p>So, I did:  </p>
  
  <pre><code>QRegularExpression rx("(^(\\bFO\\s\\b|\\@\\bFOOB\\b)) | (\\bFOOBAR\\b)");
  
  QString string0 = "Anywhere FOOBAR in the string";
  QString string1 = "FO in the beginning";
  QString string2 = "@FOOB in the beginning";
  
  QRegularExpressionMatch match = rx.match(string1);
  if (match.hasMatch())
      QTextStream(stdout) &lt;&lt; match.captured(0) &lt;&lt; endl;
  </code></pre>
  
  <p>in the code above, there is three patterns. the first and second match in the beginning of the string for FO and @FOOB, the third pattern match anywhere in the string.<br>
  Without the third pattern, the code works fine for string1 and string2. With the third pattern, it works just for string0 and string2 and not for string1. I guess the space after FO not match the third pattern then the all the match fails? There is | operator between [first, second] and the third pattern!<br>
  Or I miss something, someone can help?
  Thank you !</p>
  
  <p><strong>Edit:</strong>
  Find solution 30 seconds after I posted: These extras space are the problem</p>
  
  <pre><code>QRegularExpression rx("(^(\\bFO\\s\\b|\\@\\bFOOB\\b)) | (\\bFOOBAR\\b)");  
                                                       ^ ^ 
  </code></pre>
  
  <p>But I'm not convinced ! Why we use parenthesis then? </p>