Search and Replace in an HTML
Jaroslav Hajek
highegg at gmail.com
Thu Jul 3 23:54:15 CDT 2008
On Fri, Jul 4, 2008 at 6:38 AM, Michael Barton <bartonm09 at gmail.com> wrote:
> Hi All,
>
> I have a HTML file with the following:
>
> <html>
> <body
> The following results: %%ANSWER1%% and %%ANSWER2%%
> </body>
> </html>
>
> I have a M file running that grabs an entire line in html file and stores it
> as a string. I want to search in that string for "%%ANSWER1%%" aswell as
> "%%ANSWER2%%". If they're are not present the M file grabs and stores the
> next line and searches again.
>
> I want to have it search for the two strings mentioned in quotes above and
> replace them in the html file numbers.
>
> Now, the html file is a bit more complicated then shown above but for
> simplicity sake I simplified.
>
> My problem is that I can't figure how to search and replace in the text
> file. Can anybody help?
Check out `strrep' and `regexprep'.
regards,
> _______________________________________________
> Help-octave mailing list
> Help-octave at octave.org
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
>
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Help-octave
mailing list