regex - How to import string extracted from a file in python? -


i have 1 issue on here in file importing data text file using python.

i have data in file.

{1:f05abcdrpraxxx0000000000}{2:i1230agrixxprxxxxn}{4: :20:1234567980 :25:ab123465789013246578900000000000 :28c:110/1123156 -} 

so above data want fetch data after {4: , line line first line :20:1234567980 , on.

i want split data using regular expression if python expert have idea how make regular expression provide in answer help.

thank you

if want lines in file use

lines = list() open("yourfiile.txt") f:   line in f:     lines.append(line) lines.pop(0) #remove first line (which ends "{4:") #do want list of lines 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -