# How to read blocks or sections one by one from a txt file?

**URL:** <https://discourse.julialang.org/t/how-to-read-blocks-or-sections-one-by-one-from-a-txt-file/30469>\
**Category:** General Usage\
**Tags:** question\
**Created:** [October 30, 2019, 2:14am UTC](https://discourse.julialang.org/t/how-to-read-blocks-or-sections-one-by-one-from-a-txt-file/30469 "2019-10-30T02:14:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yan](https://avatars.discourse-cdn.com/v4/letter/y/3e96dc/32.png) [@Yan](https://discourse.julialang.org/u/Yan)\
**Post date:** [October 30, 2019, 2:14am UTC](https://discourse.julialang.org/t/how-to-read-blocks-or-sections-one-by-one-from-a-txt-file/30469/1 "2019-10-30T02:14:36Z")

</div>

Is there a read block function besides readline and readlines, or more powerful function of them according a separate symbol.

Such as: readline(“\*.txt”, separate=“\>”) # Change the default=“\n” into “\>”

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [October 30, 2019, 2:20am UTC](https://discourse.julialang.org/t/how-to-read-blocks-or-sections-one-by-one-from-a-txt-file/30469/2 "2019-10-30T02:20:20Z")

</div>

Maybe [I/O and Network · The Julia Language](https://docs.julialang.org/en/v1/base/io-network/#Base.readuntil) would meet your needs?

---

<div class="post-metadata">

**Author:** ![Yan](https://avatars.discourse-cdn.com/v4/letter/y/3e96dc/32.png) [@Yan](https://discourse.julialang.org/u/Yan)\
**Post date:** [October 30, 2019, 3:05am UTC](https://discourse.julialang.org/t/how-to-read-blocks-or-sections-one-by-one-from-a-txt-file/30469/3 "2019-10-30T03:05:02Z")

</div>

The readuntil will stop at the first delimiter or include delimiter itself by keep=true, and it seems working only in one line. So it is hard to realize my task.

My task is:  
How to read the sections by given delimiter one by one till the end of file ?

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [October 30, 2019, 3:57am UTC](https://discourse.julialang.org/t/how-to-read-blocks-or-sections-one-by-one-from-a-txt-file/30469/4 "2019-10-30T03:57:20Z")

</div>

Try `CSV.Rows`

I think @quinnj is working on a chunk-by-chunk API, I think
