0

The pattern ~(\w+-?)+[0-9]+(?=\.html)~ returns false on www.test.com/this/works/12345678901234567/2009/08/2009819107554384978.html

But it returns 1 on www.test.com/this/works/12345678901234567/2009/08/200981910755438497.html (one character less).

The PHP documentation reads:

'Returns FALSE if offset is higher than subject length.'

How so?

Live test here.

simpatico
  • 10,709
  • 20
  • 81
  • 126

0 Answers0