Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

GREP Finding Bible Verse References

Return to Member Forum

  • Author
    Posts
    • #114787
      Jason K
      Member

      In my typesetting work, I’ll occasionally work with a long manuscript that features a number of Bible verse references. Typically, I manually select these to change the character style, so I wanted to see what I could do to speed up the process.

      I only found one reference online to someone trying to do something like this, but the string doesn’t seem to find any results in my documents. Appreciate any help.

      Build a biblical reference index with GREP

      (d+s)?(w+?.?sd+[[:punct:]]d+)(.d+)?([,sd]+(.d+)?)*

    • #114805
      Jason K
      Member

      Update: So far, with some help, it’s been discovered that the backslash characters were missing. I’ve revised the code to:

      (\d+)?(\w+?.?\d+[:]\d+)(.\d+)?([,\d]+(.\d+)?)*

      From here, I need to figure out how to add looking for Roman numerals, to cover instances of something like I Corinthians or II Corinthians. Then, how to include the next complete word after the reference, in case a translation is mentioned (e.g. ESV or NKJ).

    • #114849
      Peter Kahrel
      Participant

      Could you give some examples of what you’re looking for?

    • #114853

      Here’s what I use in my sermon notes and in book layouts:

      \<(\d?|)\w*\d*:\d*~=*\d*

      Break Down:
      \< — Identify beginning of a word

      (\d?|) — Identify book number if any (e.g. 3 John, 1 Kings, etc.)

      \w*\d*:\d* — Identify any amount word characters followed by a single a single space, digit(s), colon, and digit(s)

      ~=*\d* — Identify a possible verse range with an en-dash followed by digit(s)

    • #114855
      Peter Kahrel
      Participant

      Some text examples of verses, please.

Viewing 4 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads