Skip to content

Flexible prefix in the forced subject regex #96

@SoraSuegami

Description

@SoraSuegami

We are working to make the prefix in the forced subject regex more flexible, ensuring it remains agnostic to any prefix added in reply emails.
I attempted the following three patterns, but all of them failed to compile with the error: 'Failed to build DFA for regex: "", please check your regex. Error: error building NFA", which occurs in regex-automata library depended by the zk-regex compiler. (The in the error is the regex string of the decomposed part including "[^[]*" for each decomposed regex.)

{
    "parts": [
        {
            "is_public": false,
            "regex_def": "(\r\n|^)subject:"
        },
        {
            "is_public": false,
            "regex_def": "[^[]*"
        },
        {
            "is_public": false,
            "regex_def": "\\[Reply Needed\\][^\r\n]*\r\n"
        }
    ]
}
{
    "parts": [
        {
            "is_public": false,
            "regex_def": "(\r\n|^)subject:[^[]*"
        },
        {
            "is_public": false,
            "regex_def": "\\[Reply Needed\\][^\r\n]*\r\n"
        }
    ]
}
{
    "parts": [
        {
            "is_public": false,
            "regex_def": "(\r\n|^)subject:[^[]*\\[Reply Needed\\][^\r\n]*\r\n"
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions