diff --git a/README.md b/README.md index bf914612..d56859a8 100755 --- a/README.md +++ b/README.md @@ -89,3 +89,17 @@ Below is an example of regexp patterns used for autolinking, modified in the `co } }, ``` + +## Examples + +1. Autolinking `Ticket ####:text with alphanumberic characters and spaces` to a ticket link. Use: + - Pattern: `(?i)(ticket )(?P)( : )(?P.*)` + - Template: `(ticket ${ticket_id}:${ticket_info})` + +2. Autolinking a link to a GitHub PR to a link with format "pr-repo-id". Use: + - Pattern: `https://github\\.com/mattermost/(?P.+)/pull/(?P\\d+)` + - Template: `[pr-${repo}-${id}](https://github.com/mattermost/${repo}/pull/${id})` + +3. Using autolinking to create group mentions. Use: + - Pattern: `@customgroup*` + - Template: `[@customgroup]( \\* @user1 @user2 @user3 \\* )`