How to remove a certain part of the text extracted from the database?

Is in the database column "sprite"
Data
1: 1.png
2: 109.png
etc.
How do I make php output, that would remove just a number, and the rest of the weed out?
June 10th 19 at 16:33
1 answer
June 10th 19 at 16:35
Solution
if the sprites have not only a three-character extension, and and for example .jpeg, it is best

preg_match('/^\d{1,}/',$string,$arr);

echo $arr[0];

Find more questions by tags PHP