Reputation: 175
I have several PHP regex that I use for matching ISBN 10 but I can't find one that is compatible for MySQL's REGEXP
, can someone help me match ISBN 10 in MySQL?
I have tried this one (works in PHP but not in MySQL)
"^(97(8|9))?\d{9}(\d|X)$"
Here are some values that I am running this regex against:
ISBN10: 0470945176
by Paul D. Kimmel
Publisher: John Wiley & Sons
Copyright year: © 2011
and
Thomas E. Creighton (Author)
ISBN-10: 0471153028
Publisher: Wiley-Interscience; 1 edition (April 8, 1999)
2878 pages
Upvotes: 3
Views: 512