Thank you very much Dan ! Indeed readuntil works much better. But it seems to accept only one end line character. Is it possible to use a more complex pattern ?
julia> readuntil(f, '>') "sp|P31946|1433B_HUMAN 14-3-3 protein beta/alpha OS=Homo sapiens GN=YWHAB PE=1 SV=3\nMTMDKSELVQKAKLAEQAERYDDMAAAMKAVTEQGHELSNEERNLLSVAYKNVVGARRSS\nWRVISSIEQKTERNEKKQQMGKEYREKIEAELQDICNDVLELLDKYLIPNATQPESKVFY\nLKMKGDYFRYLSEVASGDNKQTTVSNSQQAYQEAFEISKKEMQPTHPIRLGLALNFSVFY\nYEILNSPEKACSLAKTAFDEAIAELDTLNEESYKDSTLIMQLLRDNLTLWTSENQGDEGD\nAGEGEN\n>" julia> readuntil(f, '\n>') ERROR: syntax: invalid character literal Le samedi 9 juillet 2016 18:02:39 UTC+2, Dan a écrit : > > `readuntil` is your friend. > > `readline` uses `readuntil`. In fact, it is defined as: > > readuntil(s,'\n') > > >>