19

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.

Wayne Koorts
  • 10,142
  • 10
  • 45
  • 72
Ken
  • 681
  • 5
  • 14

2 Answers2

7

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.

RobertB
  • 4,422
  • 1
  • 27
  • 29
1

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

Community
  • 1
  • 1
cwd
  • 47,510
  • 50
  • 154
  • 194