Skip to content

Newline markers in the regular expressions or how to match N repeated instances of lines matching the same regex?Β #54

@ErtHub

Description

@ErtHub

Hello πŸ™‚

Header comments in my project files always contain a few words of description of what the file is and what it does. Now, depending on whether it is a huge file or not, the description may be single- or multiline. I have tried to construct a config that would match my comment in both cases, so I came up with a regex containing a newline and a multiplier symbol, such as: .+(\n.+)*. Unfortunately, the header plugin does not match any comments if the regex contains \n.

How can I make the plugin match newlines or otherwise prepare a proper config for a case when the number of lines of description is not known beforehand?

Kind regards,
Hubert

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions