function decodePathArray(string) {
    function reverseString(str) { return str.split("").reverse().join(""); }
    function unquoteDashes(str) { return str.replace(/\\-/, "-"); }

    var split = reverseString(string).split(/-(?!\\)/);
    var allReversed = map(split, reverseString);
    return map(allReversed, unquoteDashes).reverse();
  }
@ngdoc function
@name ui.router.util.type:UrlMatcher#exec
@methodOf ui.router.util.type:UrlMatcher

@description
Tests the specified path against this matcher, and returns an object containing the captured
parameter values, or null if the path does not match. The returned object contains the values
of any search parameters that are mentioned in the pattern, but their value may be null if
they are not present in `searchParams`. This means that search parameters are always treated
as optional.

@example
<pre>
new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {
  x: '1', q: 'hello'
});
// returns { id: 'bob', q: 'hello', r: null }
</pre>

@param {string} path  The URL path to match, e.g. `$location.path()`.
@param {Object} searchParams  URL search parameters, e.g. `$location.search()`.
@returns {Object}  The captured parameter values.