The construct you use is checked, but isn't included in the actual match. So the "pointer" (if you will), is still at '.' after it. The next check is to see if it is at the end of the string, which will fail.
Read the documentation very carefully. ;)