html replace

I

info

Hi all, i have many html pages, they contain something like this:

<html code_part_1>

{mospagebreak heading=heading_1&title=title_1}

<html code_part_2>

{mospagebreak heading=heading_2&title=title_2}

<html code_part_3>

{mospagebreak heading=heading_3&title=title_3}

<html code_part_4>

{mospagebreak heading=heading_4&title=title_4}

I need to
1) remove <html code_part_1> (remove html code until the first
{mospagebreak )
2) substitute heading_2 with heading_1
3) remove {mospagebreak heading=heading_1&title=title_1}

the final structure should be

<html code_part_2>

{mospagebreak heading=heading_1&title=title_2}

<html code_part_3>

{mospagebreak heading=heading_3&title=title_3}

<html code_part_4>

{mospagebreak heading=heading_4&title=title_4}

How can i do this? Are there software to do this in a fully automatic
way ?

Thanks,
Andrea
 
R

rwap

Hi all, i have many html pages, they contain something like this:

<html code_part_1>

{mospagebreak heading=heading_1&title=title_1}

<html code_part_2>

{mospagebreak heading=heading_2&title=title_2}

<html code_part_3>

{mospagebreak heading=heading_3&title=title_3}

<html code_part_4>

{mospagebreak heading=heading_4&title=title_4}

I need to
1) remove <html code_part_1> (remove html code until the first
{mospagebreak )
2) substitute heading_2 with heading_1
3) remove {mospagebreak heading=heading_1&title=title_1}

the final structure should be

<html code_part_2>

{mospagebreak heading=heading_1&title=title_2}

<html code_part_3>

{mospagebreak heading=heading_3&title=title_3}

<html code_part_4>

{mospagebreak heading=heading_4&title=title_4}

How can i do this? Are there software to do this in a fully automatic
way ?

Thanks,
Andrea

It depends if you want to do this as a one off or on a regular basis.

If as a one off (to correct the removal of a section of code at the
start), you could right a short program to parse each html page in
visual basic, Perl, PHP or whatever language you like that will run on
your PC.

I fyou want to do it regularly (for example in response to input from a
user), the easiest thing is to serve the html pages on the fly using
PHP or Perl (unless anyone else knows a better method) - each time the
page is displayed, you can then be assured that the correct information
appears.

Rich Mellor
www.internetbusinessangels.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top