Qt 6.11 is out! See what's new in the release
blog
Variable in a QRegularExpression?
-
Is it possible to construct a QRegularExpression that includes a variable? I'm not seeing any examples.
e.g.QString myVariable = "bar" QRegularExpression re ("^foo.* myVariable$") -
Is it possible to construct a QRegularExpression that includes a variable? I'm not seeing any examples.
e.g.QString myVariable = "bar" QRegularExpression re ("^foo.* myVariable$")@igor_stravinsky what about constructing the pattern before and using setPattern() method to apply it? pseudo-code:
QString myVariable = "bar"; QString myPattern = "^foo.*" + myVariable + "$"; QRegularExpression re; re.setPattern(myPattern);