Changed ReturnCountExtended to use RegExp
Fix for warnings