当前位置:编程学习 > C#/ASP.NET >>

~~~求一复杂的正则表达式~~~~~~求一复杂的正则表达式~~~~~~求一复杂的正则表达式~~~

一个朋友的一个题目,想了半天没想出来。请各位前辈帮帮忙。
题目如下:

在给你的长序列文本中搜寻下面模式:
NNNNNNNNN1N2N3N4N5N6 NNNNNNNN N6N5N4N3N2N1N7N8N9N10N11 N12N13 NNNNNNNNNNNN13N12N11N10N9N8N7NNNNNNN
 
说明 :
1.      N,NI (I=1,2,3,……13)代表A,G,C,T的任意一种.A与 T相互补,G与C相互补;
2.      连续的 N表示A、G、C、T的任意组合且长度不限制; 
3.      N1与N1 是互补字母,比如 N1 是 G, N1则是C;其他类推。

(上面一大串N中的数字是脚标)





长序列文本内容如下(很长,我截取了一段):
TTGTTTGTCCCACGACAGAGCTGGGCTGAATTATTAATGTGGATTTTGTCCAACAATGGA
CTGAAAAGGGAGAAGCCCATGAACTCTGTGAGGAGTGCATGACAGGTGCTCGTGAGATGA
CAAAGCTCAGGGCCCTCCAGCTGCTGCTGCTGCCGCCTGTTCTGCTGGGCAGCCACCCCG
TCCCAGGGAGGAAGAGCACTCACAGCTGCTGCTGATCTCCTTGGAGGGCTTCTGCTGGGA
CAAGGATCAGGATGTGGACACACCCAAACTGGACCGTCTGGCCCGAGGAGGCGTCAAGGC
CAAGTACCTCATGCCACCCTTTGTCACGATGACCTCCTCATCCCACTTCACCGTCATCCC
GGGTAAGCACCACTCTGCCCATTTCACCCGATGCCCATCAAAACCCCAGCGCTCGTCATT
CCCCAGAATAAGAAGCAGAGCTCGGTCAGCTCTAGGGAGGCTGAGGCGGCTCTGGGGTCT
CACTCTGTTGCCCAGGCTGTAGCTCAATGGCATAGTCACAGCTCAGTGGAGCCTCAAACT
CCTGGTCTCAAGCAGTCCTGCCTACCTCAGGCTTCCCAGTAGCTGGGGATACAGAGAAGC
CACGTGCCTAATTTTCTCATTTTTTTAGAGATTGGGGCAGGGGGTGTCTCGCTATGTTGC
CTAGGCTGGTTTTGAACTCCTGGCCTCAAGTGATCATCCCGCCTCAGCCTCCCAAATTGC
TGACATTACAGACATGAGCTACCGTGCCTGGCCTGATCTTTTTTAAAAAAGTAAATAAGG
CTGGGCAAGGTGGCTCACCCCTGTAATCCCAGCACTTTGGGAGCCTGAGGCAGGTGGATC
ACCTGAGGTCAGGAGTTCAAGACCAGCCTGGCCAACATGGTGAAACGTCCTCTCTCCTAA
AAACACAAAAATAAGTTGGGCATAGTGGCAGATGCCTATAACCCCAGCTACTCGGGAGTC
TGATACAGGATAATCACTTGAACCCAGGAGGTGGAAGTTGAAGTGAGCTGAGATCATGCC
ATTGCACTCCAGTTTGGGCAACAGAGCAAGATTTTGTCTCAAAAAATAAAAGTAATAAAA
ATAAAAAGGTAAATAACTAAAATCACTTTTACAGAATTGAATAAAAATACTAAAACATTG
ACATTTACAGAGCTCTGTTAGTTGAGGTGACTCATACACTCCAATGGTGTCCTGGTTCTG
TTACATGAGAATTCAAATGTCTTTCTGTGGCCCAAAAGATCCCATGCAGCCTAGCCCCTG
GCCCATCTGCCAGCCTCCCTCTTTTCTCTCCCTCTACTTCACTTCACTCCAGATCACAAA
GGCCTTTTGCCTGTGCCTTCTTCCCTGCTCCCTCAAGCCCCAGGGCCTTGACCTGTGCTA
GTCCAGTCCCTCCATCTCACCAGGAGCATGCAGTCCAGTTGGGGAGACAAATACCAGGCA
CCCTAACAGGCACATACATCCCATGACAACTCGGGAGGCACCAAGGAGGAAAAGGAGTTT
TCCAGGCACAGACTTCAGGGGTAAATTCGCTTCAAACTAGAGAGGGACAAAAGGGGCTCT
CTGAGCATGGGGCAGTTGAGCTGAAAGAGATCTCAGGGGACCAGAGCAAGGTAAAGTGTT
CCAGGCAGAGGGAACAGCATGTGTGAGGTCTCTGAGACAAAGATGTGGACATTTCAGAAT
CCCAGTGGCCACTAAAATAGAGGGATTCCAACCTAAAAAGGAGGGAGAGGAGGCTGCTGG
AAAGCAGAGGACTCTGTGTAAGAATCATAATAGCGGGGGTGGAGCCAAGAAGTCCAAATT
GGAAGAGCTCCAGTCTACAGCTCCCAGCATGAGCGACGCAGAAGACAGGTGATTTCTGCA
TCTCCAACTGAGGTACTGGGTTCATCTTACTGGGGAGTGTCAGGAAGTGGGTGCAGGAGA
GGGGGTGCAGTGCACCGAGCATGAGCCCAAGCAGGGCAAGGCATTACCTCACCCGGGAAG
TGCAAGGGGTCAGAGAATTCCCTTTCCTAGTCAAAGAAACAGGTGACAGACGGCACCCAG
AAAATCGGGTCACTCCCACCCTAATGCTGCACTTTTCCAATGGACTTTGCAAACAGCACA
CCAGGAGATTATATCCCGTGCCTGGCTCAGAGGGTCCTAAACCCATGGAGCCTCACTCAT
TGCTAGCACAGCAGTCTGAGATCAAACTGCAAGGCAGGAGCAAGGCTGGGGGAGGGGTAC
CCGCCATTGCCTAGGCTTCAGTAGGTAAACAAAGCAGCTGGGAAGCTCGAACTGGGTGGA
GCCCACTGCAGCTCAAGGAGGCCTGCCTGCCTCTGTAGACTCCACCTCTGGGGGCAGGGC
ATTGCCAAACAAAAGGCAGCAGAATCCTCTGCAGACTTAAATATCCCTGTCTGACAGCTT
TGAAGAGAGTCGTGGTTCTCCCAGCATGCAGCTGGAGATCTGAGAATGGACAGACTGCCT
CCTTAAGTGGGTCCCTGACCCCCAAGTATCCTAACTTGGAGGCACCCCCTAGTAGGGGCA
GACTGACACCTCACATGGCCGGGTACTCCTCTGAGACAAAACTTCCATAAGAACGATCAG
ACAGCAACATTTGCTGCTCACCAATATCCACTGTTCTGCAGCCTCCACTGCTGATACACA
GGCAAACAGGGTCTGGAGTGGACCTCCAGCAAACTCCAGCAGACTTGCAGCTGAGGGTCC
TGAGTGTTAGAAGGAAAACTAACAAACAGAAAGGACATCCACACTAAAACCCCATCTGTA
CATCGCCATCAAAAAAGACCAAAGGTAGATAAAACCACAAAGATGGGGAAAAAACAGAGT
AGAAAACTGGAAACTCTAAAAATCAGAGTGTCTCTCCTCCTCCAAAGGAACGCAGCTCCT
CACCAACAATGGAACAAAGCTGGACACAGAATGACTTTGAAGAGTTGAGAGAAGAAGGTT
TCAGACGATCAAACTACTCTGAGCTAAAGGATTAAGTTCAAACCCAGGGCAAAGAAGTTA
AAAACCTTGAAAAAAAATTAGATGAATGGCTAATTAGAATAACCCTTGCACAGAAGTCCT
TAAAGGACCTGATGGAGCTGAAAACCATGGCACAAGAAATAAGTGACGAATGCACAAGCC
TCAGTGGCCGATTCAATCAACTGGAAGAAAGGGTATCAGTGATGGAAGATGAAATGAATG
AAATGAAGCAAGAAGAGAAGTTAAGAGAAAAAAGAATAAAAATAAATGAACAAAGCCTCC
AAGAAATATGGGACTATGCGAAAAGACCAAATCTACATCTGATTGGTGTACCTGAAAGTG
ACAGGGATAATGGAACCAAGTTGGAAAACACTCTGTAGGATATTATGCAAGAGAACTTCC

--------------------编程问答-------------------- 嗯  很复杂  不会   --------------------编程问答-------------------- 基因? --------------------编程问答-------------------- 有点难度!! --------------------编程问答-------------------- 够复杂,不会 --------------------编程问答-------------------- 等待高手解答吧,帮顶!
补充:.NET技术 ,  C#
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,