help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search and Replace in an HTML


From: Jaroslav Hajek
Subject: Re: Search and Replace in an HTML
Date: Fri, 4 Jul 2008 06:54:15 +0200

On Fri, Jul 4, 2008 at 6:38 AM, Michael Barton <address@hidden> 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
> address@hidden
> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]