Skip to content

How to negate a pattern? #413

Description

@jgranduel

Maybe not an issue ! How do you negate a search, similar to grep -v (or rg -v ?).

If my markdown is

# para1
some text
# para2
excluded text
# para3
more text

and I want to exclude # para2. Is it directly possible in mdq as of version 0.90 ? does it recognize lookahead regexp like in PCRE2 like in
(above content being in file.md) :

cat file.md | rg --pcre2 '^(?!# para2)'

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