array_filter doesn't seems to work for words having apostrophe and dash

后端 未结 3 1773
时光取名叫无心
时光取名叫无心 2020-12-12 07:36

I have a php code as shown below:

$variable = \\CTIME\\DataPoint\\get_message();  // Line A
echo \'
\'; print_r($variable); echo \         


        
3条回答
  •  旧时难觅i
    2020-12-12 08:16

    If your string always contains Hello and Aujourd hui, use this regex workaround - notice the u flag that makes it multibyte compatible to match the dash and quote characters with a dot.

    https://3v4l.org/Xe0Rg

提交回复
热议问题