Jump to content

Please read the Forum Rules before posting.

Photo
- - - - -

Regular Expressions and Westcott Hort Greek NT


6 replies to this topic

#1 Phoenix2009

Phoenix2009

    New to Bible Support

  • Members
  • Pip
  • 5 posts
  • LocationDallas, TX
Offline

Posted 09 November 2023 - 11:45 AM

All:

 

I am a retired software developer with experience in the use of regular expressions, and have attempted to use REGEXs to perform slightly elegant searches on the WH Greek NT.

 

My first goal is to be able to search the WH GNT for all occurrences of a particular verb (by Strongs #); this was simple and worked as expected.

 

My second goal was to be able to search for some combination of TVM tags; this also was simple and worked as expected.

 

The problem occurs when I try to combine those searches. In every case they FAIL with 0 matches. (Moreover, simple searches like find an expression at the beginning of a verse failed; the Greek word I was searching for would be found anywhere within the verse. Another example of a failure was the use of the \b boundary controls; embedded words would be matched that did not obey the boundary controls.)

 

In order to troubleshoot these failures, I first ensured that the search expression was valid by copying the text from the Bible window in e-Sword into the TEST STRING field in the online REGEX101 utility and the search expression into the REGULAR EXPRESSION field. These performed as expected and found all relevant matches.

 

It finally dawned on me that perhaps the underlying format of the Greek NT was not compatible with anything other than very simple expressions. Does anyone have experience doing elegant searches on the WH+ GNT?

 

I'd like to find these questions out one way or the other.

 

Thanks much!

Dave



#2 Katoog

Katoog

    e-Sword Fanatic

  • Members (T)
  • PipPipPipPipPip
  • 1,289 posts
Online

Posted 09 November 2023 - 12:23 PM

Why do you use TVM if you can use Robinson's Morphological Analysis Codes?

The only thing that you need to do is to type V-

in Regular expressions(REGEX) with a Greek Bible module that has the codes.


Edited by Katoog, 09 November 2023 - 12:48 PM.

Restored Holy Bible 17 and the Restored Textus Receptus

https://rhb.altervis...rg/homepage.htm


#3 Phoenix2009

Phoenix2009

    New to Bible Support

  • Members
  • Pip
  • 5 posts
  • LocationDallas, TX
Offline

Posted 13 November 2023 - 11:09 AM

Hi Katoog:

 

Thanks for your reply. My use of the "TVM" was an abrreviation for the use of the V- in the REGEX search of the WH Greek NT (as I detailed above). Used by itself, using REGEX with V- works; it does not work with a search that combines a Strongs number search (as I tried to explain above as well).

 

So, let me provide a simple example of what does not work (but should):

 

Find the use of θαυμαζω G2296 which is used in the infinitive. (There are only 2 uses in the Pauline epistles: Gal 1.6 and 2 The 1.10, so this is a very contrived example.)

 

Find θαυμαζω:

(G2296)   <- this works

 

Find infinitives:

V\-..N   <- this works

 

Now combine: (should find 2 The 1.10)

(G2296).V\-..N   <- this fails

 

Explanation:

Find the word with Strongs (G2296) (not greedy), followed by any character, followed by V-, followed by 2 characters (any tense and any number) followed by N (the infinitive).

 

0 verses found.

 

The first search is easy, both with e-Sword and BlueLetterBible (and Logos).

 

The second search is easy on e-Sword but can't be done on BlueLetterBible (note, that though the tags are included on BlueLetterBible they are not searchable). (Logos can do this but is an app well outside by price range. Hence my desire to use e-Sword.)

 

The real power of the REGEX attempt above is to be able to find a specific verb with specific combination of TVM tags. In principle, this should be the general form for a regex in order to be able to do this.

 

BTW: as a confidence test, I copied the text from chapter 1 of 2The of the WH Greek into REGEX101.com, along with the test REGEX string above. It performed as expected, finding verse 10.

 

Of the many attempts to craft a REGEX string in e-Sword, I've found none which work In contrast, I've found several which work in REGEX101 when run against the same text.

 

If you can find the secret to this, I'd be much obliged.

 

Thanks.



#4 Katoog

Katoog

    e-Sword Fanatic

  • Members (T)
  • PipPipPipPipPip
  • 1,289 posts
Online

Posted 13 November 2023 - 12:59 PM

e-Sword using tags between Strong's and Morphology.

I used my Restored Textus Receptus or Greek NT WH+ and type:

G2296</num> <tvm>V-..N

with Regular Expressions(REGEX)

 

Mat 15:31 θαυμασαιG2296 V-AAN

Mat 27:14 θαυμαζεινG2296 V-PAN

Mar 15:5 θαυμαζεινG2296 V-PAN

2Th 1:10 θαυμασθηναιG2296 V-APN

 

In Gal 1:6 is θαυμαζωG2296 V-PAI-1S an Indicative.

 

 

 


Edited by Katoog, 13 November 2023 - 01:08 PM.

Restored Holy Bible 17 and the Restored Textus Receptus

https://rhb.altervis...rg/homepage.htm


#5 Phoenix2009

Phoenix2009

    New to Bible Support

  • Members
  • Pip
  • 5 posts
  • LocationDallas, TX
Offline

Posted 13 November 2023 - 02:16 PM

Katoog:

 

Thank you, this works. This tells me that it is the underlying encoding which is being searched, not the text which is rendered to the window.

 

The next question is how to construct more complex expressions. This worked to close the tag:

G2296</num> <tvm>V-..N</tvm>

 

It's going to take some time to continue the experiments for more complex expressions, but thanks much for the tip.

Dave



#6 APsit190

APsit190

    e-Sword Tools Developer

  • Members (T)
  • PipPipPipPipPip
  • 2,872 posts
  • LocationLand of the Long White Cloud (AKA New Zealand)
Offline

Posted 13 November 2023 - 04:15 PM

Katoog:

Thank you, this works. This tells me that it is the underlying encoding which is being searched, not the text which is rendered to the window.

 

The next question is how to construct more complex expressions. This worked to close the tag:

G2296</num> <tvm>V-..N</tvm>

 

It's going to take some time to continue the experiments for more complex expressions, but thanks much for the tip.

Dave

Hi Dave,

I gave you your very first "Like" because at least you've now got one.

Great-Job-Emoji.png
 
Blessings,
Stephen (Php 1:21)
 
Located in a place where time begins, and where time ends.

Edited by APsit190, 13 November 2023 - 04:18 PM.

X (formerly Twitter)

 


#7 Phoenix2009

Phoenix2009

    New to Bible Support

  • Members
  • Pip
  • 5 posts
  • LocationDallas, TX
Offline

Posted 17 November 2023 - 03:13 PM

Stephen:  Thanks much! I plan to do much posting of REGEX search templates in the very near future.

Dave





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users




Similar Topics



Latest Blogs