Range out of order in character class

前端 未结 7 1585
广开言路
广开言路 2020-12-07 00:20

I\'m getting this odd error in the preg_match() function:

Warning: preg_match(): Compilation failed: range out of order in character class at offset 54

The l

7条回答
  •  旧时难觅i
    2020-12-07 01:08

    I was receiving this error with the following sequence:

    [/-.]
    

    Simply moving the . to the beginning fixed the problem:

    [./-]
    

提交回复
热议问题