我有一个正则表达式,最终会有点长,它会让它更容易阅读,让它跨越多行.
我试过这个,但它只是barfs.
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
);
Run Code Online (Sandbox Code Playgroud)
是否有办法将上述形式的正则表达式传递给preg_match?
| 归档时间: |
|
| 查看次数: |
968 次 |
| 最近记录: |