cannot get this regex to work!



Hello,

I have just come back to regex to change a whole lot the x values in
for example to the number/s (this can be 1, 2 or 3 digits) following
the under score character, but cannot get it to work.

So for example,

<fred figure2_312.bmp" Get1(x)>

becomes

<fred figure2_3=312.bmp" Get1(3)>

I have tried

$line =~ /.*_?(\d)\..*?>/;
$line =~ s/x/$1/;

A little help please!

Cheers

Geoff

.