Get path like path/* I'm writing a module and there is a text area where the users have to add paths; then, I explode these paths, and run some commands.

I would like to let users add something like "path/*" (as in context conditions).
Is it possible?
First get a list of all paths, and then check each path.  Here is a quick example, and see drupal_match_path():

&lt;?php
  // $paths would be the value of the textarea,
  //    with path expressions separated by newlines
  $paths = "mypath/*\nmy-page-name\ntopics/cheese*";
  $aliases = db_query("SELECT alias FROM {url_alias}")-&gt;fetchCol();

  $matches = array();

  foreach ($aliases as $alias) {
    if (drupal_match_path($alias, $paths)) {
      $matches[] = $alias;
    }
  }

?&gt;