Help for this page
$_ = 'ab abc abcd abcde'; /a.*b/; # $& = 'ab abc abcd ab' /a.*?b/; # $& = 'ab'
$src =~ s/<record.*?>/$&$new_tag/; # No newlines matched $src =~ s/<record[\w\s\n-="%]*?>/$&$new_tag/; # All-inclusive class? $src =~ s/<record[^>]*>/$&$new_tag/; # Probably best