Qt's QRegExp does not support the "?" modifier for the quantifiers, and neither RegExp from QtScript does.
However in Qt/C++ one can use QRegExp::setMinimal() to make the quantifiers non-greedy.
But how to do it in QtScript?
Qt's QRegExp does not support the "?" modifier for the quantifiers, and neither RegExp from QtScript does.
However in Qt/C++ one can use QRegExp::setMinimal() to make the quantifiers non-greedy.
But how to do it in QtScript?
Ask yourself (or your favourite search engine) how to do it in JavaScript.
http://www.regular-expressions.info/javascript.html
The link you provided does not say a word about the problem.
In JavaScript the only way I'm aware of is using the ? modifier.
There is no global modifier for the entire regexp, like "i" for case insensitiveness.
And there seems to be no RegExp object's method which allows this.
So since Qt does not support the ? modifier, it should enable other way of making the QtScript's RegExp non-greedy.
It says the problem is outside the scope of this forum.
Then why don't you use it?In JavaScript the only way I'm aware of is using the ? modifier.
Qt Script is an implementation of ECMAScript (aka JavaScript), not a full blown separately maintained product. You can always export QRegExp to your script if you want it available there.So since Qt does not support the ? modifier, it should enable other way of making the QtScript's RegExp non-greedy.
Simply because it does not work in QtScript.Then why don't you use it?In JavaScript the only way I'm aware of is using the ? modifier.
I will try exporting QRegExp. I hope it won't requite more exports, since these scripts are meant to be an easy interface for users. They should be able to use it just like JavaScript without reading tons of additional documentation.
How exactly did you try it?
You can export any function you want in a way you see fit. It will not require anything unless you make it require something.I will try exporting QRegExp. I hope it won't requite more exports, since these scripts are meant to be an easy interface for users. They should be able to use it just like JavaScript without reading tons of additional documentation.
Bookmarks