I've been reading in HTML files in Matlab with readfile
, with the interest of using regexp
to extract data from it. The function is returning the data the file as a string, which preserves the 'structure' of the HTML file, for example newlines. For example, if you try to do a file read on a file with the below contents it will return a string with the same structure.
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>
A Small Hello
</TITLE>
</HEAD>
</HTML>
I'm looking for a function that will return a continuous string like ...
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>
A Small Hello
</TITLE>
</HEAD>
<BODY>
<H1>Hi</H1>
<P>This is very minimal "hello world" HTML document.</P>
</BODY>
</HTML>
This format will assist in my regexp
endeavours.
Many thanks, Bob M