<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 2/12/2022 6:43 am, Scott Bloom
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:BYAPR10MB30967D0D1FD537E140056982A9149@BYAPR10MB3096.namprd10.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}div.WordSection1
        {page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Im looking for a way using QRE to do
          something like the following<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">auto regEx = QRegularExpression(
          “(?<name>.*)” );<o:p></o:p></p>
        <p class="MsoNormal">if ( regEx.match( string ) )<o:p></o:p></p>
        <p class="MsoNormal">                auto newString =
          regEx.replace( string, “${name}” );<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Using the standard set of regex
          subsitutions <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Is this something anyone is looking at? Or
          is there a solution outthere?<br>
          <br>
          Scott<o:p></o:p></p>
      </div>
    </blockquote>
    <p>Hi Scott,<br>
      <br>
      I have no idea what 'the standard set of regex substitutions' are,
      but have you seen QString replace(const QRegularExpression
      &re, const QString &after) ?<br>
      <br>
      It supports capturing groups in the after string as well.<br>
      <br>
      Hope that helps,<br>
      <br>
      Tony<br>
    </p>
    <p><br>
    </p>
  </body>
</html>