/** * Match * * [I'm a reference-style link][Arbitrary case-insensitive reference text] * * [You can use numbers for reference-style link definitions][1] * * [link text itself] */ public function __construct() { parent::__construct(self::NAME, self::ORDER, '\\[(?:\\\\.|[^]\\\\])+\\](?: ?\\[(?:\\\\.|[^]\\\\])+\\])?'); }
/** * * Match: * * # H1 * ## H2 * ### H3 * #### H4 * ##### H6 * ###### H7 * * # H1 # * */ public function __construct() { parent::__construct(self::NAME, self::ORDER, '\\n#{1,6}[^\\n]+(?=\\n)'); }
/** * Match * * new line feed (\n) * * match all empty characters */ public function __construct() { parent::__construct(self::NAME, self::ORDER, '\\n(?:[ \\t]*(?=\\n))?'); }
/** * Match * * [reference name]: url */ public function __construct() { parent::__construct(self::NAME, self::ORDER, '\\n[ \\t]*\\[(?:\\\\.|[^]\\\\])*\\]:[ \\t]*[^ \\t\\n]+[ \\t]*\\n?[ \\t]*(?:"(?:\\\\.|[^"\\\\])+"|\'(?:\\\\.|[^\'\\\\])+\'|\\((?:\\\\.|[^\\(\\\\])+\\))?(?=\\n)'); }
/** * Match * * ![alt text][image] */ public function __construct() { parent::__construct(self::NAME, self::ORDER, '!\\[(?:\\\\.|[^]\\\\])+\\][\\t ]*\\[(?:\\\\.|[^]\\\\])*\\]'); }
/** * Match * * https://example.com * www.example.com */ public function __construct() { parent::__construct(self::NAME, self::ORDER, '(?:https?://)?[\\da-z\\.-]+\\.[a-z\\.]{2,6}(?:[/\\w \\.-]*)*/?'); }
/** * Match * * [I'm an inline-style link](https://www.google.com) * * [I'm an inline-style link with title](https://www.google.com "Google's Homepage") * * [I'm a relative reference to a repository file](../blob/master/LICENSE) */ public function __construct() { parent::__construct(self::NAME, self::ORDER, '\\[(?:\\\\.|[^]\\\\])+\\][\\t ]*\\([\\t ]*(?:\\\\.|[^\\)\\\\ ])+[\\t ]*(?:"(?:\\\\.|[^"\\\\])+")?\\)'); }
/** * Match * * Alt-H1 * ====== * * Alt-H2 * */ public function __construct() { parent::__construct(self::NAME, self::ORDER, '\\n[^\\n]*\\n[=-]{2,}(?=\\n)'); }
/** * Match * \\ * \` * \* * \_ * \{ * \} * \[ * \] * \( * \) * \# * \+ * \- * \. * \! */ public function __construct() { parent::__construct(self::NAME, self::ORDER, '\\\\\\\\|\\\\`|\\\\\\*|\\\\\\_|\\\\\\{|\\\\\\}|\\\\\\[|\\\\\\]|\\\\\\(|\\\\\\)|\\\\\\#|\\\\\\+|\\\\\\-|\\\\\\.|\\\\\\!'); }
public function __construct() { parent::__construct(self::NAME, self::ORDER, ' \\n'); }