Skip to content

Regex shouldn't work #204

@gwelch-contegix

Description

@gwelch-contegix

Can I get an explanation as to why this regex works (?P<project_id>\w+)(-)(?P<jira_id>\d+)?
It's suggested to use https://regex101.com to test but testing with it matches on all sorts of things that I don't want it to, mainly destroying links, https://regex101.com/r/XPUAgu/4
Now on Mattermost it works how I want it to, but how is https://regex101.com or any other website/knowledge I have access to supposed to help me write a regex for this plugin?
If I write a regex that does work on https://regex101.com (?P<pre>\s|^)(?P<number>KEY-\d{1,4}) https://regex101.com/r/axJv7b/1 it then fails to match properly in Mattermost and also has issues displaying the regex.
Screenshot 2022-12-13 at 10 45 45

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions