# Meta.parse failes on double newlines

**URL:** <https://discourse.julialang.org/t/meta-parse-failes-on-double-newlines/54272>\
**Category:** General Usage\
**Created:** [January 30, 2021, 1:14pm UTC](https://discourse.julialang.org/t/meta-parse-failes-on-double-newlines/54272 "2021-01-30T13:14:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [January 30, 2021, 1:38pm UTC](https://discourse.julialang.org/t/meta-parse-failes-on-double-newlines/54272/2 "2021-01-30T13:38:21Z")

</div>

`Meta.parse("...")` will only consume one toplevel expression and raise an error if there is anything after the first toplevel expression. You can use `Meta.parse("...", 1)` to only consume the first expression and get back the parsed expression and the index of the string it stopped parsing at. In Julia 1.6, there is also `Meta.parseall`, which will parse all toplevel expressions at once. If it’s just about trailing newlines though, you might also just want to remove those beforehand using `strip`.

---

_[View the full topic](https://discourse.julialang.org/t/meta-parse-failes-on-double-newlines/54272)._
