Feature request, support PCRE-style features, including lookaheads and backreferences in `nsq_to_file` to allow for wildcard archiving with exclusions
Right now nsq_to_file only supports RE2 style regex's in https://github.com/nsqio/nsq/blob/51470ca4d8dfa466172305e51d6ee7a053e3efad/apps/nsq_to_file/topic_discoverer.go#L99 through the use of the built-in golang regexp.MatchString. This prevents the use of wildcard archiving with exclusions which is a use case we have.
So a topic pattern like .* works but one like ^(?!not_so_important_events$)[a-z0-9_]+$ which would ignore the topic not_so_important_events doesn't work since it requires lookaheads which RE2 does not permit.
like: https://regex101.com/r/4S2pGx/1
Would you be up to accept a PR that added the https://github.com/philipprochazka/regexp2 library and used it for this regex in https://github.com/nsqio/nsq/blob/51470ca4d8dfa466172305e51d6ee7a053e3efad/apps/nsq_to_file/topic_discoverer.go#L99
@mreiferson thoughts?
Source: nsqio/nsq