我正在读取包含英语和日语字符的单元格的csv文件。 单元格数据之一如下所示。
1: Sumanaseka Sasith 2018/9/19 (水) 13:27
Human have a altruistic feeling when help another with somethings. People are forgetting that because of the selfish motives they have.
We must compress that selfishness to help some to have that altruistic feeling.
对于上面的示例,我在下面创建了一个正则表达式。
$ x [$ i] = for循环中的数据变量。
preg_match("/(\d*\:)\s((\w*)\s(\w*))\s([12]\d{3}\/([1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01]))\s\(.*\)\s([0-9]{2}\:[0-9]{2})(.*)/s", $x[$i], $matches)
这很好。但是,对于以下数据,由于日语字符而无法正常工作。
2: 齋藤 伸久 2018/2/8 (木) 06:55
https://www.google.com
I will study with you all the way of thinking as a company.
I will study Mr inamori 74 philosophies
对于此示例,没有人知道捕获日语字符“ 2:斋藤伸久2018/2/8(木)06:55”。 谢谢。