# Function findall and overlapping

**URL:** https://discourse.julialang.org/t/function-findall-and-overlapping/123126
**Category:** General Usage
**Created:** [November 26, 2024, 9:01pm UTC](https://discourse.julialang.org/t/function-findall-and-overlapping/123126 "2024-11-26T21:01:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Colin\_Beckingham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colin_beckingham/32/4878_2.png) [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)
#### Post date: [November 26, 2024, 9:01pm UTC](https://discourse.julialang.org/t/function-findall-and-overlapping/123126/1 "2024-11-26T21:01:40Z")

</div>

When I use the code

`findall("DD","DDDAADDD")`

I get the response

```julia
2-element Vector{UnitRange{Int64}}:
 1:2
 6:7

```

But perhaps the answer might include the others, such as `2:3` and `7:8`? What am I missing here? The function seems to miss overlaps.

---

<div class="post-metadata">

### Author: ![rocco\_sprmnt21](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rocco_sprmnt21/32/20127_2.png) [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)
#### Post date: [November 26, 2024, 9:04pm UTC](https://discourse.julialang.org/t/function-findall-and-overlapping/123126/2 "2024-11-26T21:04:00Z")

</div>

> [@Colin\_Beckingham](#):
>
> findall(“DD”,“DDDAADDD”)

you have to explicitly request it

```julia
julia> findall("DD","DDDAADDD", overlap=true)
4-element Vector{UnitRange{Int64}}:
 1:2
 2:3
 6:7
 7:8

```

---

<div class="post-metadata">

### Author: ![Colin\_Beckingham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colin_beckingham/32/4878_2.png) [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)
#### Post date: [November 26, 2024, 9:18pm UTC](https://discourse.julialang.org/t/function-findall-and-overlapping/123126/3 "2024-11-26T21:18:51Z")

</div>

OK thanks. I thought I read the REPL help for the function and there was no mention of that option that I could see.

---

<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: [November 26, 2024, 9:42pm UTC](https://discourse.julialang.org/t/function-findall-and-overlapping/123126/4 "2024-11-26T21:42:00Z")

</div>

> [@Colin\_Beckingham](#):
>
> I thought I read the REPL help for the function and there was no mention of that option that I could see.

That’s odd, `overlap` is definitely [in the docstring for `findall(::String, ...)`](https://github.com/JuliaLang/julia/blob/a17db2b138b0e042329d2a3fb2efd53c68e2563f/base/strings/search.jl#L519-L520).

But for some reason that isn’t one of the methods for which the docstring is printed in the REPL help?
