Replacing remote images with local uploaded images issue

the problem seems to be in this regexp because my link reference is not a number :

2 Likes