Re: [Interest] QRegularExpression for replace

2022-12-05 Thread Scott Bloom
e- From: Elvis Stansvik Sent: Monday, December 5, 2022 5:37 AM To: Scott Bloom Cc: Thiago Macieira ; interest@qt-project.org Subject: Re: [Interest] QRegularExpression for replace Maybe I'm dumb, but I'm still not sure what is being asked for. If it's regular expression replacement with

Re: [Interest] QRegularExpression for replace

2022-12-05 Thread Elvis Stansvik
Maybe I'm dumb, but I'm still not sure what is being asked for. If it's regular expression replacement with back-references in the replacement string, I think that's possible with QString::replace like I showed. Elvis ___ Interest mailing list Interest@

Re: [Interest] QRegularExpression for replace

2022-12-04 Thread Thiago Macieira
On Sunday, 4 December 2022 14:51:51 PST Scott Bloom wrote: > I guess my point is, whatever happened to code less, do more 😊 Nothing. I am saying that the functionality doesn't exist and is expensive to implement, but meanwhile you can still do what you want and more effectively than the Qt imple

Re: [Interest] QRegularExpression for replace

2022-12-04 Thread Scott Bloom
I guess my point is, whatever happened to code less, do more 😊 -Original Message- From: Interest On Behalf Of Thiago Macieira Sent: Sunday, December 4, 2022 9:46 AM To: interest@qt-project.org Subject: Re: [Interest] QRegularExpression for replace On Saturday, 3 December 2022 23:02

Re: [Interest] QRegularExpression for replace

2022-12-04 Thread Elvis Stansvik
Den tors 1 dec. 2022 kl 20:44 skrev Scott Bloom : > > Im looking for a way using QRE to do something like the following > > > > auto regEx = QRegularExpression( “(?.*)” ); > > if ( regEx.match( string ) ) > > auto newString = regEx.replace( string, “${name}” ); It's a bit hard to k

Re: [Interest] QRegularExpression for replace

2022-12-04 Thread Thiago Macieira
On Saturday, 3 December 2022 23:02:24 PST Scott Bloom wrote: > That is basically what I did for the non problematic replacements. The ones > that not only need the captured text, but also need the rest of the text I > didn't bother implementing The point is that you may do it programmatically, in

Re: [Interest] QRegularExpression for replace

2022-12-03 Thread Scott Bloom
022 8:14 PM To: interest@qt-project.org Subject: Re: [Interest] QRegularExpression for replace 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( "(?.*)" ); if

Re: [Interest] QRegularExpression for replace

2022-12-02 Thread Thiago Macieira
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( "(?.*)" ); > if ( regEx.match( string ) ) > auto newString = regEx.replace( string, "${name}" ); This requires havi

Re: [Interest] QRegularExpression for replace

2022-12-01 Thread Tony Rietwyk
On 2/12/2022 6:43 am, Scott Bloom wrote: Im looking for a way using QRE to do something like the following auto regEx = QRegularExpression( “(?.*)” ); if ( regEx.match( string ) )     auto newString = regEx.replace( string, “${name}” ); Using the standard set of regex subsitution

[Interest] QRegularExpression for replace

2022-12-01 Thread Scott Bloom
Im looking for a way using QRE to do something like the following auto regEx = QRegularExpression( "(?.*)" ); if ( regEx.match( string ) ) auto newString = regEx.replace( string, "${name}" ); Using the standard set of regex subsitutions Is this something anyone is looking at? Or