Since we don't know which RDBMS you are using, I'm going to go with the simplest answer. This assumes you're using MSSQL.
Use the ISNUMERIC() function to determine if SUBSTRING(loandescription,1,4)
is actually a number. If it is, then you can cast/convert it at that point and compare it to the "year" you're interested in. IE:
...
ProcessDate = (CONVERT(VARCHAR, GETDATE(), 112)-1)) AND
(ISNUMERIC(SUBSTRING(loandescription,1,4)) = 1 AND
CAST(SUBSTRING(loandescription,1,4) AS INT) = (YEAR(GETDATE()) - 25))
Due to boolean short circuiting, if the first 4 characters AREN'T numeric, then it won't bother casting to compare. Same rule applies with other RDBMS systems (such as MySQL, PostgreSQL, SQLite, etc), but the methods might be a bit different. In fact, I don't think MySQL or PostgreSQL even have the ISNUMERIC
function, meaning you need to find other ways (Regex) to test.