RegEx standards across languages

后端 未结 3 1930
灰色年华
灰色年华 2020-12-09 04:43

I am asking this question because I notice there are some slight differences in the syntax of RegEx between different languages.

I am wondering if there is a RegEx

3条回答
  •  孤街浪徒
    2020-12-09 05:32

    No there isn't such a standard. Of course there is PCRE, POSIX BRE, POSIX ERE, ...

    But in fact there will be "small" differences in any language. You can relay on very basic things for most flavours, like the . for any character or the quantifiers +*?, character classes are also common, but it already starts at predefined classes like \w, is it supported at all? or ASCII based or Unicode?

    A good help here is the flavor comparison on regular-expressions.info by Jan Goyvaerts.

提交回复
热议问题