RegEx替换匹配序列和剥离空格[关闭]

I have some string entries that look like this:

00 34 32 35 00 33 00 47 : A Cat
77 59 32 35 00 00 00 11 : Dog
29 59 32 35 01 00 00 11 : Dog's Toy

I have to transform them as following using a RegEx replace:

<Entry Name="A Cat" Code="0034323500330047"/>
<Entry Name="Dog" Code="7759323500000011"/>
<Entry Name="Dog's Toy" Code="2959323501000011"/>

Any idea?

Using a regex to make the transformation isn't the simplest solution. I would do this in JavaScript :

var t = str.split(':');
var result = '<Entry Name="'+t[1]+'" Code="'+t[0].trim().replace(/ /g,'')+'"/>';