我尝试过:
preg_match('
^J[0-9]{7}:\s+
(.*?) #Extract the Transaction Start Date msg
\s+J[0-9]{7}:\s+Project\sname:\s+
(.*?) #Extract the Project Name
\s+J[0-9]{7}:\s+Job\sname:\s+
(.*?) #Extract the Job Name
\s+J[0-9]{7}:\s+
', $this->getResultVar('FullMessage'), $atmp);
有没有办法将以上形式的正则表达式传递给preg_match?
发布于 2018-05-03 15:01:56
preg_match("/
test
/x", $foo, $bar);
发布于 2018-05-03 16:41:57
preg_match('/
^J[0-9]{7}:\s+
(.*?) #Extract the Transaction Start Date msg
\s+J[0-9]{7}:\s+Project\sname:\s+
(.*?) #Extract the Project Name
\s+J[0-9]{7}:\s+Job\sname:\s+
(.*?) #Extract the Job Name
\s+J[0-9]{7}:\s+
/x', $this->getResultVar('FullMessage'), $atmp);
https://stackoverflow.com/questions/-100004477
复制相似问题