# Finding position of a sequence in a UInt8 array?

**URL:** <https://discourse.julialang.org/t/finding-position-of-a-sequence-in-a-uint8-array/45757>\
**Category:** New to Julia\
**Created:** [August 29, 2020, 5:23pm UTC](https://discourse.julialang.org/t/finding-position-of-a-sequence-in-a-uint8-array/45757 "2020-08-29T17:23:23Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 29, 2020, 8:15pm UTC](https://discourse.julialang.org/t/finding-position-of-a-sequence-in-a-uint8-array/45757/9 "2020-08-29T20:15:54Z")

</div>

> [@Ahmed\_Salih](#):
>
> Lastly could you explain to me what the last “1” does in your example?

It’s the starting index for the search, the same as the [`start` argument of `findnext`](https://docs.julialang.org/en/latest/base/strings/#Base.findnext-Tuple%7BAbstractString,AbstractString,Integer%7D) — it says to search starting at byte `1`. Passing `2` means to search starting at byte `2`.

In this way, you can find multiple occurrences:

```julia
i = Base._searchindex(a, [0x90,0xea,0x00], 1)
Base._searchindex(a, [0x90,0xea,0x00], i+1) # finds the second occurrence, if any

```

---

_[View the full topic](https://discourse.julialang.org/t/finding-position-of-a-sequence-in-a-uint8-array/45757)._
