DECLARE @t nvarchar(16)
SET @t = 'T5e3st003'
SELECT RIGHT(@t, MIN(number)-1)
FROM Numbers
WHERE SUBSTRING(REVERSE(@t), number, 1) NOT IN ('1','2','3','4','5','6','7','8','9','0')
AND number < 10
DROP TABLE #test
CREATE TABLE #test (t nvarchar(16))
INSERT INTO #test (t)
SELECT 'T5e3st003' UNION ALL SELECT 'Test001'
SELECT RIGHT(t, MIN(number)-1)
FROM Numbers, #test
WHERE SUBSTRING(REVERSE(t), number, 1) NOT IN ('1','2','3','4','5','6','7','8','9','0')
AND number < 10
GROUP BY t
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden