# What is the type of an empty return from match()?

**URL:** <https://discourse.julialang.org/t/what-is-the-type-of-an-empty-return-from-match/6818>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 1, 2017, 3:00am UTC](https://discourse.julialang.org/t/what-is-the-type-of-an-empty-return-from-match/6818 "2017-11-01T03:00:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wherrera](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wherrera/32/5288_2.png) [@wherrera](https://discourse.julialang.org/u/wherrera)\
**Post date:** [November 1, 2017, 3:00am UTC](https://discourse.julialang.org/t/what-is-the-type-of-an-empty-return-from-match/6818/1 "2017-11-01T03:00:37Z")

</div>

In the following:  
julia\> e = if false; end

julia\> e

julia\> f = match(r"x", “y”)

julia\> f

julia\> a =   
0-element Array{Any,1}

julia\> e == a  
false

julia\> e == f  
true

…What is the type of e and f which they are equal to?

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [November 1, 2017, 3:03am UTC](https://discourse.julialang.org/t/what-is-the-type-of-an-empty-return-from-match/6818/2 "2017-11-01T03:03:23Z")

</div>

You can just ask the help system:

```julia
julia> f = match(r"x", "y")

help?> f
search: fd for fma fld fft full fld1 find filt fill fft! fdio

  No documentation found.

  f is of type Void.

  Summary
  ≡≡≡≡≡≡≡≡≡

  struct Void <: Any

help?> Void
search: Void @vectorize_2arg @vectorize_1arg versioninfo

  Void

  A type with no fields that is the type nothing.

help?> nothing
search: nothing

  nothing

  The singleton instance of type Void, used by convention
  when there is no value to return (as in a C void
  function). Can be converted to an empty Nullable value.

```

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [November 1, 2017, 3:08am UTC](https://discourse.julialang.org/t/what-is-the-type-of-an-empty-return-from-match/6818/3 "2017-11-01T03:08:16Z")

</div>

or just `typeof` if you just want to know the type.
