Parses URL route pattern.
Pattern format:
Empty string corresponds to empty pattern.
/ matches directory separator. Corresponds to rmatchDirSep.
/
* matches a part of route entry name. Corresponds to rmatchAny or rmatchEntry.
*
{capture} captures a part of entry name as capture. Corresponds to rcaptureAny or rcaptureEntry.
{capture}
capture
/** matches any number of directories. Corresponds to rmatchDirs
/**
/{capture:**} captures any number of directories as capture. Corresponds to rcaptureDirs.
/{capture:**}
{(regexp)flags} matches a part of entry name matching the given regular expression with optional flags. Corresponds to rcaptureRegExp.
{(regexp)flags}
{capture(regexp)flags} captures a part of entry name matching the regular expression with optional flags. Corresponds to rcaptureRegExp.
{capture(regexp)flags}
?name requires URL search parameter to present. Corresponds to rmatchSearchParam('name').
?name
rmatchSearchParam('name')
?name=value requires URL search parameter to have the given value. Corresponds to rmatchSearchParam('name', 'value').
?name=value
rmatchSearchParam('name', 'value')
Everything else matches verbatim and corresponds to rmatchString or rmatchName.
The pattern parts are URL-decoded after parsing. So the pattern string may contain URL-encoded reserved and special characters.
Pattern string.
Simple route pattern.
Generated using TypeDoc
Parses URL route pattern.
Pattern format:
Empty string corresponds to empty pattern.
/matches directory separator. Corresponds to rmatchDirSep.*matches a part of route entry name. Corresponds to rmatchAny or rmatchEntry.{capture}captures a part of entry name ascapture. Corresponds to rcaptureAny or rcaptureEntry./**matches any number of directories. Corresponds to rmatchDirs/{capture:**}captures any number of directories ascapture. Corresponds to rcaptureDirs.{(regexp)flags}matches a part of entry name matching the given regular expression with optional flags. Corresponds to rcaptureRegExp.{capture(regexp)flags}captures a part of entry name matching the regular expression with optional flags. Corresponds to rcaptureRegExp.?namerequires URL search parameter to present. Corresponds tormatchSearchParam('name').?name=valuerequires URL search parameter to have the given value. Corresponds tormatchSearchParam('name', 'value').Everything else matches verbatim and corresponds to rmatchString or rmatchName.
The pattern parts are URL-decoded after parsing. So the pattern string may contain URL-encoded reserved and special characters.