MonkPaul has asked for the wisdom of the Perl Monks concerning the following question:
My current project i have to take in two DNA sequences for an enzyme recognition site in a sequence 1 and the sequence itself 2.
What im now looking to do is to search for the presence of the enzyme seq.1 in the long seq.2 and whenever i find seq1 in seq2, highlight it in bold.
Basically it searching for a substring in a string and highlighting it whereever it occurs.
How can i possibly highlight the substring?
The current code im using searches for the substring using the index() function but im not sure how to make it bold. If it helps, the result has to be displayed in HTML.
Any help would be great.
Cheers
Fantastic. Thanks guys. i had a rough idea how to go about it but wasnt sure of its possible implementation. :) :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Highlight a substring
by ikegami (Patriarch) on Apr 06, 2005 at 14:48 UTC | |
|
Re: Highlight a substring
by JediWizard (Deacon) on Apr 06, 2005 at 14:52 UTC | |
by ikegami (Patriarch) on Apr 06, 2005 at 15:23 UTC | |
by the_0ne (Pilgrim) on Apr 06, 2005 at 17:02 UTC | |
by ikegami (Patriarch) on Apr 06, 2005 at 18:09 UTC |