On Thursday, 1 December 2022 11:43:39 PST Scott Bloom wrote:
> Im looking for a way using QRE to do something like the following
> 
> auto regEx = QRegularExpression( "(?<name>.*)" );
> if ( regEx.match( string ) )
>                 auto newString = regEx.replace( string, "${name}" );

This requires having a parser for the replacer too, which is not something we 
currently have.

The QRegularExpressionMatch result gives you all the regions in the string 
where captures were found, so you can  do this yourself if you know your 
captures.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering



_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to