Get path like path/*
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;