I need two regular expressions to search and replace all bible verses in an html file with hyperlinks.
I already have the regex that locates the Bible verses and it works great with one very small change needed.
What I need is the regex expression for the replacement text (the hyperlink).
Here is a sample Bible verse:
Here is the text that I want it replaced with:
<a href="[url removed, login to view] 3:16;&version=49;">John 3:16</a>
The regex that locates Bible verses is:
It works wonderfully except when there are two verses separated by a comma like this: John 3:16, 17
When there is no space before verse 17 (like this "John 3:16,17") it works properly when there is a space before verse 17 (like this "John 3:16, 17") it misses the 17 at the end.
So to summarize:
1) I need the Bible verse locating regex modified to account for the possible space before the second verse
2) I need a regex to use to replace verses with hyperlinks