Jerome
04-27-2003, 03:40 PM
Hi,
I like to transform the following.
I have:
holiday.257
or
vacation.8976
The result should be:
hol/257
or
vac/8976
In words:
the first 3 letters from the word before the point, than a forward slash, and the complete number after the point.
I tried:
var var1=holiday.257
var1=var1.replace(/(\w{3}).(\w{3})/,'$1/$2');
But my knowledge is to limited!
Thanks,
Jerome
I like to transform the following.
I have:
holiday.257
or
vacation.8976
The result should be:
hol/257
or
vac/8976
In words:
the first 3 letters from the word before the point, than a forward slash, and the complete number after the point.
I tried:
var var1=holiday.257
var1=var1.replace(/(\w{3}).(\w{3})/,'$1/$2');
But my knowledge is to limited!
Thanks,
Jerome