in reply to RegExp help
I changed your $file var from $1 to $2, simply because i think it makes more sense that way. Padding the delimiter with optional whitespace will take care of trailing space, but this only works if that weird thingy is always going to be the same.use strict; my $str = 'some text ()\xA1 file.txt'; my ($desc,$file) = split (/\s*\(\)\\xA1\s*/,$str); print "<a href=\"$file\">$desc</a><br>\n";
jeffa
|
|---|