I'm extracting some information from a line in a data file, and I came up with following regex to do it. I have two questions: What would break it, and why doesn't $title have the space in between END OF CENTURY and <BASIC> ? I'd have thought that using the negated character class to grab END OF CENTURY would take everything up until the next <, but it knows to leave out the space immediately before.
$_ = "(KONAMI ORIGINAL) END OF THE CENTURY <BASIC> / NO.9";
m|^\(([^\)]*)\) ([^<]*) <([^>]*)> / (.*)$|;
( $source, $title, $mode, $artist ) = ( $1, $2, $3, $4 );
print ">$source< >$title< >$mode< >$artist<\n";