PDA

View Full Version : Define a QRegExp using angular brackets <>



aaditya190
4th December 2013, 05:30
I want to define a regular expression containing angular brackets <> such that whatever I write in these brackets gets some pattern.. e.g QRegExp rx; rx.setForeground("orange");.. Can anyone help me with how to define such a regular expression?

stampede
4th December 2013, 08:13
define a regular expression containing angular brackets <> such that whatever I write in these brackets gets some pattern
Can you give some examples ?

QRegExp rx; rx.setForeground("orange");
I failed to find "setForeground" method in QRegExp class :) What does it mean for regular expression to have an orange foreground ? :D

aaditya190
4th December 2013, 08:18
I was able to implement the angular brackets as QRegExp("<.*>");.. sorry i incorrectly mentioned about foreground, i have used it as rx.setForeground(QColor("orange"));.... It worked.. Thank You very much...