# Reading a txt. file with two different delimiters

**URL:** <https://discourse.julialang.org/t/reading-a-txt-file-with-two-different-delimiters/81087>\
**Category:** General Usage\
**Tags:** csv\
**Created:** [May 15, 2022, 9:01am UTC](https://discourse.julialang.org/t/reading-a-txt-file-with-two-different-delimiters/81087 "2022-05-15T09:01:54Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [May 15, 2022, 4:08pm UTC](https://discourse.julialang.org/t/reading-a-txt-file-with-two-different-delimiters/81087/7 "2022-05-15T16:08:05Z")

</div>

See also [this related post and its solution](https://discourse.julialang.org/t/reading-data-text-files-delimited-with-both-spaces-tabs/64851/4).

Adapted here for reference:

```julia
using DelimitedFiles, DataFrames

input2="""
6
0
0 0 1; 4
0 0 2; 5
0 0 3; 6
"""
io = IOBuffer(input2)
data = readdlm(IOBuffer(replace(read(io, String), ";" => " ")), skipstart=2) # trick by @GunnarFarneback
df = DataFrame(data, :auto)

```

---

_[View the full topic](https://discourse.julialang.org/t/reading-a-txt-file-with-two-different-delimiters/81087)._
