Skip to content

require using !!/watch-force to watch expressions with a lookahead at the start #14856

@micsthepick

Description

@micsthepick

Is your feature request related to a problem? Please describe.

When adding watched keywords, the usual advice from Makyen is to not start with a lookahead for performance reasons, https://chat.stackexchange.com/transcript/message/68148509 and the kerfuffle that follows is a prime example of how this can turn problematic fast.

Describe the solution you'd like

I propose making !!/watch force require you to use -force if you REALLY want to start a regex with (?! or (?= or variants, but am open to suggestions.

Describe alternatives you've considered

might want to make it a bit more robust?

Additional context

cc @makyen

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