Is there a bug in Ruby lookbehind assertions (1.9/2.0)?

后端 未结 1 926
悲哀的现实
悲哀的现实 2021-01-01 09:31

Why doesn\'t the regex (?<=fo).* match foo (whereas (?<=f).* does)?

\"foo\" =~ /(?<=f).*/m          => 1
\         


        
相关标签:
1条回答
  • 2021-01-01 09:43

    This has been officially classified as a bug and subsequently fixed, together with another problem concerning \Z anchors in multiline strings.

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