in reply to Re^3: bold color text and export to file
in thread bold color text and export to file

newtoperlprog:

If your ranges overlap, there are several strategies you can use. If the overlapping regions are supposed to be highlighted in a single color, then you can simply merge the overlapped regions before applying the edits. If you want to highlight the overlapping region in a different style, then you need to break the ranges up into the non-overlapping and overlapping pieces. Once you've preprocessed your list so that there are no overlaps remaining, you can then apply your edits.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re^4: bold color text and export to file

Replies are listed 'Best First'.
Re^5: bold color text and export to file
by newtoperlprog (Sexton) on Sep 23, 2014 at 20:58 UTC

    Dear Roboticus

    Thank you for your suggestion. The ranges don't overlap and they are discreet from each other.

    The problem with the code is its not able to demarcate the start and stop of the range (example: 1 till 15 and so on) to which the html tags can be applied. I can understand that my logic in the loop is incorrect and am trying to learn to fix this problem.

    Any help will be greatly appreciated