Define a QRegExp containing arithmetic operators
Is there a way to define a QRegExp containing all arithmetic operators in a single expression? I am able to do it individually , like for operator + as QRegExp rx("\\+");.. I want to define a single regular expression containing all arithmetic operators. Is it possible? Can anyone help me with this?
Re: Define a QRegExp containing arithmetic operators
It may be possible but you will have to define "all arithmetic operators". The operators for FORTRAN are different from those for COBOL or Java. You might use a character class and/or alternation.
Rather than starting a new thread for every single regular expression you want to create (1, 2, 3) I suggest your find yourself a good book or online tutorial on the topic and learn how regular expressions work. The QRegExp docs are not devoid of merit either. There are plenty of tools out there to help your experiment with regular expressions without coding.