The correct copy of your function is this:

Qt Code:
  1. QString r = "Telephone";
  2. r.remove(QRegExp("[^aeiou]"));
  3. // r == "eeoe"
To copy to clipboard, switch view to plain text mode