I have somewhat of a complicated (as far as I am concerned) pattern match problem that has me stumped.
For example, take two DNA strings, A and B. The letters w,x,y, and z can denote either A,T,G, or C
$A = ATGGAGTCGACGAATTTGAAGAAT
$B = xxxxxxATGGAGyxxxTCGAzxxxxCGAATTTGAAxxwGAAT
As you will notice, $A is contained within $B but is discontinous, separated by x's.
The basic premise is to use the sequence in $A and match this against the sequence of $B. In the process of doing this, each of the 'x' strings (4 in total) need to be extracted and categorized separately i.e. each on its own line (with an identifier # ideally).
The output from such a comparison would be;
xxxxxx
yxxx
zxxxx
xxw
I was trying some split stuff but got nowhere! Any help would be greatly! appreciated. I hope this makes sense.
Thanks,
Dr.J
In reply to Complicated pattern match by dr_jgbn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |