次の形式のエラーがあるファイルがあります。
================================================
Header of file with date and time
================================================
Loaded options from XML file: 'path/to/file/some_file.xml
extendedPrintPDF started
extendedPrintPDF: Error: Unsaved documents have no full name.; line: 332
================================================
Header of file with date and time
================================================
Error opening document: path/to/file/some_file1: Error: Either the file does not exist, you do not have permission, or the file may be in use by another application; line: 190
Error opening document: path/to/file/some_file2: Error: Either the file does not exist, you do not have permission, or the file may be in use by another application; line: 190
使ってます
preg_match_all('/Error: (.*)/m', $file_data, $erroenames,PREG_PATTERN_ORDER);
配列内のすべてのエラーを取得します。最初のセットのエラーに対しては正常に機能しているようです。ただし、「Error Openingdocument」で始まる2番目のセットのエラーは、配列のSINGLE要素として表示されるように見えるため、9ではなく4つの配列要素しかありません。ただし、httpで同じことを試してみると://www.spaweditor.com/scripts/regex/index.php、すべてのエラーは配列の異なる要素として表示され、9つの要素を取得します。誰かが私が間違っていることを教えてもらえますか?|を使ってみました 「ドキュメントを開くときにエラーが発生しました」の正規表現をもう1つ作成します。しかし、それでもうまくいかないようです。