in reply to perl extraction from a file

This doesn't seem to be html, but it's in tags, and HTML::Treebuilder can parse it, so if all you want to do is strip out the tags, maybe this is helpful for a quick and dirty. Probably easier to maintain than the regexes anyway.

use strict; use warnings; use HTML::TreeBuilder; use Data::Dumper; while ( <DATA> ) { my $tree = HTML::TreeBuilder->new_from_content($_); my $body = $tree->look_down("_tag" => "body" ); my $contents = ( $body->content_list() )[0]; print "$contents\n"; } __DATA__ <user_name>$userId</user_name> <job_id>$jobId</job_id> <finish_time>$timeF$ampmF</finish_time> <status>COMPLETED</status>
outputs:
$userId $jobId $timeF$ampmF COMPLETED
UPDATED: Same basic idea, but I like this better.