|P is for Practical|
Match text from txt to htmlby corfuitl (Sexton)
|on Sep 04, 2019 at 13:15 UTC||Need Help??|
corfuitl has asked for the wisdom of the Perl Monks concerning the following question:
I have a problem to solve and I would appreciated your help.
I have a txt file which contains one sentence per line and its html correspondence, and I would like to write in the html which line matches with what sentence in the html. Please note that in html one line may contain more than one sentences.
For example, my TXL file looks like:
And the html
As you can see, the html file contains some extra html code, which makes things complex.
What I want to do is to add some html code and wrap the sentence:
The order of the TXT corresponds to the order of the HTML. If no match found, then it should go to the next segment. Any ideas?
Thanks in advance for your help