regex match() works in FF/Chrome but not IE 8

前端 未结 3 1680
自闭症患者
自闭症患者 2021-01-21 11:43

I have the following jQuery call, which returns a match in FF/Chrome, but returns null in IE 8.

Here\'s the fiddle if you\'d like to try it for yourself.

And her

3条回答
  •  有刺的猬
    2021-01-21 12:37

    Use this RegExp:

    /\d+-(\d+)\xa0of+\xa0(\d+)/
    

    http://jsfiddle.net/gilly3/KNbpN/

    Sadly, it seems, IE8 doesn't recognize non-breaking spaces as a white-space (\s) match.

提交回复
热议问题