Scanning for Unicode Numbers in a string with \d

前端 未结 3 564
傲寒
傲寒 2020-12-19 05:05

According to the Oniguruma documentation, the \\d character type matches:

decimal digit char
Unicode: General_Category -- Decimal_N

3条回答
  •  甜味超标
    2020-12-19 05:25

    \d will only match for ASCII numbers by default. You can manually turn on Unicode matching in a regex using the (counter-intuitive) (?u) syntax:

    "

提交回复
热议问题