20

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.

2

2 Answers 2

9

See Regular Expression Engine Comparison Chart maintained by Roger Qui which a copy of the information available in the original answer. (Credit to Uberhumus for the new link.)

[Original Answer] See Flavor Comparison at Regular-Expressions.info.

Sign up to request clarification or add additional context in comments.

2 Comments

This is now unusable unfortunately
You can update the link to gist.github.com/CMCDragonkai/6c933f4a7d713ef712145c5eb94a1816 it's still working.
3

"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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.