Are Java and C# regular expressions compatible?

前端 未结 6 2071
醉酒成梦
醉酒成梦 2020-11-29 21:55

Both languages claim to use Perl style regular expressions. If I have one language test a regular expression for validity, will it work in the other? Where do the regular ex

6条回答
  •  时光取名叫无心
    2020-11-29 22:12

    .NET Regex supports counting, so you can match nested parentheses which is something you normally cannot do with a regular expression. According to Mastering Regular Expressions that's one of the few implementations to do that, so that could be a difference.

提交回复
热议问题