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:
parent
e85212bb66
commit
eb05ce5613
2 changed files with 1 additions and 1 deletions
BIN
dist/files_opds-0.5.2.tar.gz
vendored
BIN
dist/files_opds-0.5.2.tar.gz
vendored
Binary file not shown.
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue