Replace string in a string

User avatar
sal21
PlatinumLounger
Posts: 4339
Joined: 26 Apr 2010, 17:36

Replace string in a string

Post by sal21 »

Myfile=hejjbeuu.jpg
I need to replace all before .jpg, myvar=0001

To the end

0001.jpg

Note:
The lenght before .jpg is variabile

User avatar
HansV
Administrator
Posts: 78378
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Replace string in a string

Post by HansV »

Easy:

myfile = myvar & ".jpg"
Best wishes,
Hans