POSIX和PCRE之间的正则表达式语法更改 [英] Regex Syntax changes between POSIX and PCRE

查看:140
本文介绍了POSIX和PCRE之间的正则表达式语法更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前正在升级Varnish Cache服务器. 作为该过程的一部分,我们仅升级了其中一个,以查看其与旧版本相比的性能.

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.

此新版本中进行的一些重大更改将正则表达式引擎从POSIX更改为PCRE.这意味着我们的某些清除(正则表达式清除)已停止在较新的服务器上工作.

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.

我想知道是否有人可以列出/指向我列出POSIX和PCRE之间的实际语法差异.也许是将POSIX正则表达式转换为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.

推荐答案

请参见风味比较 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.

这篇关于POSIX和PCRE之间的正则表达式语法更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆