# Search for names in modules

**URL:** https://discourse.julialang.org/t/search-for-names-in-modules/6117
**Category:** New to Julia
**Created:** [September 27, 2017, 3:32pm UTC](https://discourse.julialang.org/t/search-for-names-in-modules/6117 "2017-09-27T15:32:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![harven](https://avatars.discourse-cdn.com/v4/letter/h/3da27b/32.png) [@harven](https://discourse.julialang.org/u/harven)
#### Post date: [September 27, 2017, 3:32pm UTC](https://discourse.julialang.org/t/search-for-names-in-modules/6117/1 "2017-09-27T15:32:09Z")

</div>

Is there a way to search for all names in installed packages containing a given string? Something like

```
searchpkg(str) =
  for pkg in keys(Pkg.installed())
    filter(x -> contains(x, str), string.(names(pkg)))
  end

```

That doesn’t work though because pkg is a string and names wants a module. Also it is probably not very efficient.

---

<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: [September 27, 2017, 3:50pm UTC](https://discourse.julialang.org/t/search-for-names-in-modules/6117/2 "2017-09-27T15:50:17Z")

</div>

If you want names search, you have to load the module. You can do that with `eval` and you’ll get the `Module` you want. If you want to do string search, then just iterate through the files.
