diff --git a/README.org b/README.org index e480ca501506d04d6928c360bb367c96bd42216d..c0e7f2cefcf80f6d4430773c11d31379879552b2 100644 --- a/README.org +++ b/README.org @@ -6,7 +6,7 @@ PicaReader provides classes for reading Pica+ records encoded in PicaXML and PicaPlain. -PicaReader is copyright (c) 2012-2016 by Herzog August Bibliothek Wolfenbüttel and released under the +PicaReader is copyright (c) 2012-2017 by Herzog August Bibliothek Wolfenbüttel and released under the terms of the GNU General Public License v3. * Installation diff --git a/src/HAB/Pica/Parser/PicaPlainParser.php b/src/HAB/Pica/Parser/PicaPlainParser.php index afd52ae00a556eb07d75ede527655caf7917406b..87c8b92e7d1f597c17b556d732115b7d1e7af1aa 100644 --- a/src/HAB/Pica/Parser/PicaPlainParser.php +++ b/src/HAB/Pica/Parser/PicaPlainParser.php @@ -20,7 +20,7 @@ * * @package PicaReader * @author David Maus <maus@hab.de> - * @copyright Copyright (c) 2012 - 2016 by Herzog August Bibliothek Wolfenbüttel + * @copyright Copyright (c) 2012 - 2017 by Herzog August Bibliothek Wolfenbüttel * @license http://www.gnu.org/licenses/gpl.html GNU General Public License v3 */ @@ -38,7 +38,7 @@ class PicaPlainParser implements PicaPlainParserInterface { $field = array('subfields' => array()); $match = array(); - if (preg_match('#^([012][0-9]{2}[A-Z@])(/([0-9]{2}))? (\$.*)$#Du', $line, $match)) { + if (preg_match('#^([012][0-9]{2}[A-Z@])(/([0-9]{2}))?\s+(\$.*)$#Du', $line, $match)) { $field = array('tag' => $match[1], 'occurrence' => $match[3] ?: null, 'subfields' => $this->parseSubfields($match[4]));; diff --git a/tests/fixtures/single_record.pp b/tests/fixtures/single_record.pp index f4866427e2d6275b9c069e5a1ca7d72822e59c21..7851ab6653a06f30fdc07596d7bdf58837c50ee4 100644 --- a/tests/fixtures/single_record.pp +++ b/tests/fixtures/single_record.pp @@ -5,7 +5,7 @@ 001U $0utf8 001X $00 002@ $0Aau -003@ $0024836885 +003@ $0024836885 003O $aOCoLC$019095997$v2009-06-15 004A $03787307699$fDM 26.- 004A $03787307702$fDM 68.-