|  | Posted by rwap on 07/03/30 11:53 
info@alientech.it wrote:> 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
  Navigation: [Reply to this message] |