There's no such thing as "too complicated to match with RegExp." Often it does make sense to use a module that understands the format, but in a case like this where you're matching one exact chunk of text, a regex is pretty straightforward:
perl -0777 -p -i -e 's|<div class="sectionHeading.+?</table>\s+</div>|
+|s' test.html
To apply that only to certain files, you can wrap that regex in perl code that filters multiple files through it, or use the shell to tell that command what files to work on.
Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.