<commit_before># Add a custom linkification filter

{!admin-only.md!}

You can add custom linkification filters to your organization that
automatically turn phrases in messages into links to other pages.

{!go-to-the.md!} [Filter settings](/#organization/filter-settings)
{!admin.md!}

5. In the green section labeled **Add a new filter**, find the **Regular expression**
and **URL format string** fields.

    * In the **Regular expression** field, enter a
[regular expression](http://www.regular-expressions.info) that searches and
identifies the phrases you want to linkify.

        For example, if you want to linkify any numeric phrase that begins with
a `#`, you could use the regular expression `#(?P<id>[0-9]+)` to find those
phrases, where `id` is the variable that represents the phrase found by the
search.

        Please note that all regular expressions used for custom linkification
filters in your organization must be unique. In addition, the regular expression
you enter must have a variable that gets identified by the URL format string.

    * In the **URL format string** field, insert a URL that includes the regular<commit_msg>help: Advertise custom linkification filters better.<commit_after># Add a custom linkification filter

{!admin-only.md!}

Linkification filters are used to automatically translate syntax
referring to an issue or support ticket in a message into a link to
that issue or ticket on a third-party site. For instance, you can
define a filter to automatically linkify #1234 to
https://github.com/zulip/zulip/pulls/1234, Z1234 to link to that
Zendesk ticket ID, or anything similar.

{!go-to-the.md!} [Filter settings](/#organization/filter-settings)
{!admin.md!}

5. In the green section labeled **Add a new filter**, find the **Regular expression**
and **URL format string** fields.

    * In the **Regular expression** field, enter a
[regular expression](http://www.regular-expressions.info) that searches and
identifies the phrases you want to linkify.

        For example, if you want to linkify any numeric phrase that begins with
a `#`, you could use the regular expression `#(?P<id>[0-9]+)` to find those
phrases, where `id` is the variable that represents the phrase found by the
search.

        Please note that all regular expressions used for custom linkification
filters in your organization must be unique. In addition, the regular expression
you enter must have a variable that gets identified by the URL format string.

    * In the **URL format string** field, insert a URL that includes the regular
{'fraction_non_alphanumeric': 0.07884465261514442, 'fraction_numerical': 0.00702576112412178, 'mean_word_length': 4.4071729957805905, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6612034', 'n_tokens_mistral': 679, 'n_tokens_neox': 641, 'n_words': 350}