public static String toRegex(String glob, String separators) {
    return new GlobToRegex(glob, separators).convert();
  }
Converts the given glob to a regular expression pattern. The given separators determine what
characters the resulting expression breaks on for glob expressions such as * which should not
cross directory boundaries.

<p>Basic conversions (assuming / as only separator):

<pre>{@code
?        = [^/]
*        = [^/]*
**       = .*
[a-z]    = [[^/]&&[a-z]]
[!a-z]   = [[^/]&&[^a-z]]
{a,b,c}  = (a|b|c)
}</pre>
jimfs/src/main/java/com/google/common/jimfs/GlobToRegex.java