Originally Posted by kiwidude
I've just taken a quick look at your changes to look to incorporate into the next release this weekend (most of my plugins will get a new release to support some changes Kovid is making). However I am not too sure about that replacement of spaces in the text. Doesn't that cause a problem for the entire rest of the regex, such as "International Standard Book Number" etc? What was the thinking behind that?
I've got a lot of books that had no ISBN and did not get one after using your plugin.
It occured to me that 90% of my non-isbn tagged books (total of 2018 have no ISBN in calibre) had an isbn in the text.
Some had 1sbn or IS8N, but most had 978 123 456 x
It does not give problems with isbn you can try some in http://www.regextester.com/
This is because you build a good regex yourself
I strip the spaces out of match(1). This is the match that only contains numbers, spaces and - (At this moment I think, maybe there are also 978.123.456.x numbers).
The last part had to move to avoid a space at the end of the code. This gave some errors.
One thing: You used the match(1), but I'm not sure why? Why did you made 2 matches, match 0 is never used.
One other thing: I also have books with ISBN on the last, second-last or last page before the footnotes. Is it possible to add an option to start the search at the end of the file?
Hope I've been clear enough. Going to sleep now (it's 1.41 here, 6.00 is wake-up time