Ruby Regex vs Python Regex

前端 未结 5 492
一个人的身影
一个人的身影 2021-01-12 05:10

Are there any real differences between Ruby regex and Python regex?

I\'ve been unable to find any differences in the two, but may have missed something.

5条回答
  •  庸人自扰
    2021-01-12 05:53

    The regular expression libraries for Ruby and Python are developed by two completely independent teams. Even if they are identical now (and I wouldn't be certain they are), there's no guarantee that they won't diverge sometime in the future.

    The safest position is to assume they're different now, and assume they will continue to be different in the future.

提交回复
热议问题