I am struggling with building a regular expression for parsing this kind of strings (bible scriptures):
'John 14:16–17, 25–26'
'John 14:16–17'
'John 14:16'
'John 14'
'John'
So the basic pattern is:
Book [[Chapter][:Verse]]
where chapter and verse is optional.
Try this here
See and test it here on Regexr
Because of the
(?:,\s*\d+(?:–\d+)?)*at the end you can have a list of verses, verses ranges at the end.