CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: [SOLVED] Regex on multiple lines for Science: Edit Log



puchu
New User

Apr 5, 2013, 2:28 PM


Views: 375
[SOLVED] Regex on multiple lines for Science

I am a scientist, I have a txt file like this:

Code
 
IDENTIFIERS

dbEST Id: 76635231
EST name: YG14511
GenBank Acc: JK818318
GenBank gi: 384372042

CLONE INFO
DNA type: cDNA

PRIMERS
PolyA Tail: Unknown

SEQUENCE
TGACTGCGTACGAATTTGATAGCTGCTTCTGCTTTCATGGAACCATTAAAGGAATGGATG
TTTGTTGACAAGGAAGGTGTACAAGTTGGACCACTGGAGAAGGATGCTATCAGAAGATTC
TGGTCAAAGAAAGGTATTGATTGGACAACAAGGTGCTGGGCTTCTGGGATGTCAGATTGG
AAGAGATTACGTGATATCCGTGAACTTCGGTGGGCACTAGCTGTTCGGGTTCCTGTTCTT
ACTTCAACGCAGGTACTGTTGTATTATGCATGTTTACTTGAGTCTATATTACATTGTGAA
TGCTACATTGCACTTTGAGTTGATTTTGACTAAGTTTACTTCACCACAAACTGCAGCTAC
TGGTGGACTGCATTTGTAGTTGTATCCGGTTTGGACTCA

Entry Created: Apr 16 2012
Last Updated: Apr 17 2012

I would like to extract only the "TGACT..." sequence and put that in a one line variable without \n and called $sequene in perl, could you tell me which is the correct regular expression or a right way to extract? The problem that the TGACT...sequence is distributed through several lines. Any help will be useful, thanks!


(This post was edited by puchu on Apr 6, 2013, 9:26 AM)


Edit Log:
Post edited by puchu (New User) on Apr 6, 2013, 9:26 AM
Post edited by puchu (New User) on Apr 6, 2013, 9:26 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives