1
0
Fork 0
mirror of https://github.com/Yetangitu/owncloud-apps.git synced 2025-10-02 14:49:17 +02:00

Added missing 'X' in regex lookahead

This commit is contained in:
frankdelange 2014-12-22 15:03:01 +01:00
parent e85212bb66
commit eb05ce5613
2 changed files with 1 additions and 1 deletions

Binary file not shown.

View file

@ -36,7 +36,7 @@ class Isbn
$match = array();
foreach($text as $line) {
/* generic ISBN 10/13 pattern. Checks for unicode dashes ('‒–—―‑‐﹣--') as well as regular hyphens. */
if(preg_match_all('/ISBN(?:[‒–—―‑‐﹣--]?(?:1[03])?)?:?\s*(?=[\d‒–—―‑‐﹣--]{10,17})(((?:97[89])[0-9—―-]{9,14})|([\d—―-]{9,12}[\dXx]))/u', $line, $match)) {
if(preg_match_all('/ISBN(?:[‒–—―‑‐﹣--]?(?:1[03])?)?:?\s*(?=[\dXx‒–—―‑‐﹣--]{10,17})(((?:97[89])[0-9—―-]{9,14})|([\d—―-]{9,12}[\dXx]))/u', $line, $match)) {
foreach($match[1] as $hit) {
$hit = preg_replace('/[^0-9X]/i','',$hit);
if(self::validate($hit)) {