What are the differences between perl and java regex capabilities?

后端 未结 3 2001
南笙
南笙 2020-12-01 23:26

What are the differences between perl and java with regard to what regular expression terms are supported?

This question is isolated to just the regular expressions,

相关标签:
3条回答
  • 2020-12-02 00:05

    There is a paragraph in java.util.regex.Pattern API "Comparison to Perl 5".

    0 讨论(0)
  • 2020-12-02 00:20

    The slides from Tom Christiansen's OSCON talk Unicode Support Shootout: The Good, the Bad, & the (mostly) ugly cover some of the differences between Perl and Java (and other languages) regarding support of the Unicode technical recommendations for regexes, and they distinguish between Java 1.6 and 1.7 (which improves support significantly).

    0 讨论(0)
  • 2020-12-02 00:22

    The "Comparison to Perl 5" section of java.util.regex.Pattern lists many differences. For example, Java does not support conditional regex. For that, you need to use some external library like JRegex.

    0 讨论(0)
提交回复
热议问题