Hi,
I'm the most stupid programmer when using REGEX!
I have a huge html file and want to split in n small files.
Chuncks of texts to be saved in individual files begins with:
</p><hr width="75%"><center><tt>-387-</tt></center><br>
then the texts goes in multiple lines up to the next line like this one. Seems I can use the <hr width="75%"> as delimiter and the file name must be from <center><tt>-387-</tt></center>
(file387.txt, in this case.)
Can someone help me with the REGEX?
I can get the file$name
$name= /<tt>-(.*)-<\/tt><\/center><br>/;
but have no idea on how to get multiple line after this.
Thank you for any help.
full sample:
</p><hr width="75%"><center><tt>-330-</tt></center><br>
from them must travel unimaginable millions of miles
to reach him. As the world forces become impersonal
they become more majestic, and a deeper feeling is
evoked in their presence. Science aids true religion by
increasing awe, by increasing knowledge.
</p><hr width="75%"><center><tt>-331-</tt></center><br>
...
I'm the most stupid programmer when using REGEX!
I have a huge html file and want to split in n small files.
Chuncks of texts to be saved in individual files begins with:
</p><hr width="75%"><center><tt>-387-</tt></center><br>
then the texts goes in multiple lines up to the next line like this one. Seems I can use the <hr width="75%"> as delimiter and the file name must be from <center><tt>-387-</tt></center>
(file387.txt, in this case.)
Can someone help me with the REGEX?
I can get the file$name
$name= /<tt>-(.*)-<\/tt><\/center><br>/;
but have no idea on how to get multiple line after this.
Thank you for any help.
full sample:
</p><hr width="75%"><center><tt>-330-</tt></center><br>
from them must travel unimaginable millions of miles
to reach him. As the world forces become impersonal
they become more majestic, and a deeper feeling is
evoked in their presence. Science aids true religion by
increasing awe, by increasing knowledge.
</p><hr width="75%"><center><tt>-331-</tt></center><br>
...