Pergunta

We are currently in the process of upgrading our Varnish Cache servers. As part of the process, we upgraded only one of them to see how it behaves compared to the older versions.

Some of the major changes made in this new version is changing the regex engine from POSIX to PCRE. That means that some of our purges (regex purges) have stopped working on the newer server.

I was wondering if anyone can list/point me to a list of actual syntax differences between POSIX and PCRE. Or maybe a function that converts a POSIX regex to PCRE regex.

This is so that I can convert only the purges going to the newer server - without affecting the current regex syntax that is implemented in the system for the other servers.

Foi útil?

Solução

See Flavor Comparison at Regular-Expressions.info.

EDIT: The page above has been updated. It now brings you to a Table of Contents page. On the sub-pages linked from there tables of features are shown, and you can select two different "flavors" of regular expression syntax to compare for the feature set shown on each sub-page.

Outras dicas

"Regular Expressions as used in R"

I didn't find a comparison chart but I did find Regular Expressions as used in R which has a lot of information near the top part of the document related to POSIX and the bottom half details pcre and also gives links to the standards.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top