First of all, are you sure you typed it correctly? if so, it is very poorly written xml - there can't be two attributes of the same name! perhaps you meant date="20080505" ? I will assume you did. If you didn't, and it is indeed a second 'version' attribute, let me know and i'll modify my answer.
#Say you have the string in a variable:
$string = "<?xml verion="1.0" date="20080505">;
#use regex string matching:
#returns true if it finds date, equals, quote, 8 digits, quote.
$string =~ /date=\"(\d{8})\"/
#what it matched in parentheses is contained in the $1 var:
$date = $1;
Now $date contains the string "20080505"
Let me know if this isn't what you needed, or if you need more help
-Eric
|