# Glob patterns document -- persist\_to\_workspace paths

**URL:** <https://discuss.circleci.com/t/glob-patterns-document-persist-to-workspace-paths/17442>\
**Category:** Build Environment\
**Created:** [October 17, 2017, 6:13pm UTC](https://discuss.circleci.com/t/glob-patterns-document-persist-to-workspace-paths/17442 "2017-10-17T18:13:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![levlaz](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/levlaz/32/36978_2.png) [@levlaz](https://discuss.circleci.com/u/levlaz)\
**Post date:** [October 18, 2017, 8:40am UTC](https://discuss.circleci.com/t/glob-patterns-document-persist-to-workspace-paths/17442/2 "2017-10-18T08:40:14Z")

</div>

We are using `Glob` from Go, and the pattern matches [filepath.Match](https://golang.org/pkg/path/filepath/#Match).

```auto
pattern:
	{ term }
term:
	'*' matches any sequence of non-Separator characters
	'?' matches any single non-Separator character
	'[' ['^'] { character-range } ']'
	            character class (must be non-empty)
	c matches character c (c != '*', '?', '\\', '[')
	'\\' c matches character c

character-range:
	c matches character c (c != '\\', '-', ']')
	'\\' c matches character c
	lo '-' hi matches character c for lo <= c <= hi

```

Per the Go docs:

```auto
The pattern may describe hierarchical names such as /usr/*/bin/ed (assuming the Separator is '/'). 

```

So in your specific example `./packages/*/lib/*` should suffice.

Please note that everything must be relative to the work space root directory.

cc @michelle-luna we could probably just snag that right out of the Go docs and put it in ours since its the source of truth.

---

_[View the full topic](https://discuss.circleci.com/t/glob-patterns-document-persist-to-workspace-paths/17442)._
