Use indexOf() to match individual characters, which is a lot faster than
QRegExp. As a side effect, don't try to expand what we just inserted.
Change-Id: I964fbd92055f2f2649e7d8ed5739cf1fc7cae927
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/2cc17a61eb6d0fee80fd388fcc5be03a59e4f2b5)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>