Simplified testAtEnd function by using built-in global regexp functionality to do repeated searching.
Simplified testAtEnd function by using built-in global regexp functionality to do repeated searching.

svn path=/trunk/KDE/kdelibs/kate/; revision=804180

sandsmark/kate,hlamer/kate,hlamer/kate,hlamer/kate,hlamer/kate,hlamer/kate,sandsmark/kate,hlamer/kate,hlamer/kate,DickJ/kate,jfmcarreira/kate,sandsmark/kate,hlamer/kate,DickJ/kate,cmacq2/kate,cmacq2/kate,hlamer/kate,DickJ/kate,cmacq2/kate,jfmcarreira/kate,hlamer/kate,sandsmark/kate,DickJ/kate,jfmcarreira/kate