http://www.perlmonks.org?node_id=487086

monkfan has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to put the bracket in a string given the set of its substrings. Like this:
String Substrings Desired Result 1.CCCATCTGTCCTTATTTGCTG ATCTG ATTTG CCC[ATCTG]TCCTT[ATTTG]CTG 2.ACCCATCTGTCCTTGGCCAT CCATC AC[CCATC]TGTCCTTGGCCAT 3.CCACCAGCACCTGTC CCACC CCAGC GCACC [CCACCAGCACC]TGTC 4.CCCAACACCTGCTGCCT CCAAC ACACC C[CCAACACC]TGCTGCCT

Originally posted as a Categorized Question.