Skip to content

Adjustments to DynamicPlaceholdersRegex to support whitespaces in PlaceholderKeys. #5

@maik-grosser

Description

@maik-grosser

Hi,

In my current project I introduced DynamicPlaceholders.Mvc to replace a Legacy DynamicPlaceholders implementation. The change to DynamicPlaceholdersRegex introduced in version 1.2.0.2 do not produce a match for PlaceholderKeys containing whitespaces. In my opinion, whitespaces should never be used in placeholder keys. In my current project, some PlaceholderSettings were initially set up this way. Now I have to deal with it.

You could extend the regex to handle those cases as well.

([a-zA-Z0-9\s_-]+?)_[\d\w]{8}\-(?:[\d\w]{4}\-){3}[\d\w]{12}(?:_.+)?$

What do you think about it?

Best Regards, Maik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions