I think you should read the documentation on QRegularExpression and especially read the Perl tutorial linked to in that doc. Your regular expressions are much too simple to match the kind of strings you have as input, and I do not think you can do it with a single regular expression.
You might also read this."a-aa+bb+4.4e-05-1.2e+2"
You can see that even parsing simple expressions like this one takes a lot of code to recognize the symbols, operators, and constants and convert that into tokens.




Reply With Quote
Bookmarks