PDA

View Full Version : What happened to "Regular Expression Searches"?



Jim Wert
09-02-2010, 10:50 PM
In BW8 help,
chapter 24 "The Command Line - Introduction",
section titled "More Complex Word and Phrase Searches",
subsection "Doing Regular Expression Searches"
is the following information:
"BibleWorks does, however, have the ability to do verse-based regular expression searches, for those hardy souls that want or need to use it. It is at present implemented only for English text. To do a regular expression search, you enter the search criteria preceded by a tilde ‘~’. ... A table of supported regular expression operators is located in Regular Expression Syntax Summary (http://www.bibleworks.com/forums/bwh43i_Codes_Regex.htm)."

I tried this out in BW8, and consistently got messages like this:
"Could not find the verse reference "~god" in the current search version."

When I tried it in BW7 it worked fine. I don't recall seeing anywhere that this functionality was disabled for BW8. It strikes me as quite powerful.

Anyone have any insight on this?

Thanks,
Jim

Yaku Lee
09-03-2010, 06:44 AM
With NAU as the search version in my BW8, entering <~god> on the CL resulted in 354 verses found. Whatever suffix is attached to the word “god” is included in the verses found: “goddess” (1Ki 11:5), “godless” (Job 8:13), “godliness” (Dan 11:32), “godlessness” (1Ti 2:2), “godly” (Deu 33:8), and “gods” ( Gen 31:30). Of course “God’s” is not included in the verses found because the search is case sensitive.

Trying the tilde search with other English version as the search version, there was no problem at all with my BW8.

But if you type <.~god> with a period at the beginning on the CL, BW8 responds with the following error message:
“The following word or form cannot be found in the current search version: ~god.”

Regards.

bobvenem
09-03-2010, 08:10 AM
My attempts with just a tilde at the start always give me the error message that I must begin command line searches with a period. Is there a setting in Options that needs to be set to do regular searches?

Yaku Lee
09-03-2010, 09:07 AM
As far as I know, the command line can start with any one of the control characters <.>, </>, <’>, <;>, <~>, etc. and there is no special setting required to start with any of them. And I have tried <~> for the first time thanks to you.

If your system requires to start the CL with a <.>, then I hope someone else can chip in to clear the situation.

Regards.

Jim Wert
09-03-2010, 01:14 PM
This morning, seeing Yaku's response, I tried <~god> with no success (same error message). I did not try it without the <>. BW version was (I'm pretty sure) 8.0.018i.
I then applied the latest executable update (8.0.018m), and it worked! (without the <>).
My computer/BW8 will not accept <>.

But the statistics are very confused.
Search Version: NRS
Command line: ~god
Main Window Status Bar: "19 verses, 1 form, 21 hits 0.03 secs."
Stats Tab of Analysis Window (set for #hits in book): "NRS: 24892 matches in 379 of 37791 verses (1.00%)."
In the bar chart (I can't get screen print into this forum), showing a few examples:
Gen 8 (which is correct)
Jer 1601 (which is not correct)
4Es 1636 (more like 19 or 20)
4Ma has 3 hits, but is not in bar chart.

I tried to back out to an earlier checkpoint to get my old executable back, but it kept giving me the new executable, so I can't reconstruct what was happening.

Technical info:
from "About BibleWorks"
BW Version 8.0.018m.1 (Standard Edition)
Account type: Administrator

Prior version (when ~ and <~...> did not work): 8.0.018i
Operating System: Windows 7 Home Premium Version 6.1 (Build 7600)

Note: in BW7, the same query gives much more plausible statistics, although the status bar count, and the Detailed Stats window disagree on the number of verses found (504 to 503)

--Jim

Lee
09-03-2010, 02:11 PM
Jim, Yaku can correct me if I'm wrong, but I believe his use of <> corresponds to your use of ' ' and " ". He meant to type only the following:

~god

I have never seen this feature, so I thank you for bringing it to my attention. I tried it on the latest installation of BibleWorks 8, and it worked beautifully.

ISalzman
09-03-2010, 03:35 PM
FWIW, I've tried every permutation of Command Line syntax to try and perform this search (with <>, without <>), and I am completely unable to perform this search. I'm running BW 8.0.0.018M.1 - i.e., the latest version - on Windows XP.

bobvenem
09-03-2010, 06:16 PM
I am running the latest BW8 as well, and cannot in any configuration get this to work.

Yaku Lee
09-03-2010, 07:38 PM
Jim, Yaku can correct me if I'm wrong, but I believe his use of <> corresponds to your use of ' ' and " ". He meant to type only the following:

~god

I have never seen this feature, so I thank you for bringing it to my attention. I tried it on the latest installation of BibleWorks 8, and it worked beautifully.

I apologize for the confusion caused by my use of angle brackets to both of you. But I was simply following the BW convention of their use. Just a few lines down the chapter heading of “24 The Command Line—Introduction,” from the third sentence under “Wild Card Searches and Range Operators,” examples like “<.faith*>” for CL input start appearing. I could have said “without the angle brackets” for clarity, though.

I also find the stats very confusing for NRS <~god> search. I am even flabbergasted to find NEGATIVE search results as in the following:


762

Moreover the stats are not consistent with every trial of <~god> search. And I cannot duplicate the negative search results.

However, I have never experienced any inconsistency or confusion with stats of searches like <.god*>. If you want to be case sensitive, you can try a GSE like the following:



763

The last two searches have an additional usefulness. The expression found can be marked with some background color of your choice for ease of identification.

Regards.

Yaku Lee
09-03-2010, 08:41 PM
I am running the same BW8 as you do, and I am running it on XP. My CL input is as shown below, where the search version is indicated as NRS in three locations, and in two places it is marked that no search limit is applied: “Limits” in gray and one of the 5 green squares below the CL.




764




And part of the search result is as shown below:




765




Some observations to make: stats on the bottom line and the upper line on the analysis window, connected with straight red lines, do not match. Search window shows only 7 Gen references while the analysis window says 8 hits for Gen. And hits for Jer (38) and 4Es (21) drastically contrast with what Jim reported.




In short, the stats are completely unreliable.




Regards.

ISalzman
09-03-2010, 08:58 PM
Great report there, Yaku. I think you are essentially correct. The stats don't appear to match at all and this makes me wonder whether this malfunction is unique to the regular expressions search, or if there is a system-wide problem in BW vis-a-vis matching statistics (between the status bar, stats tab, etc.).

One thing that needs to be said however is that your chart showing the stats tab and the hits in Genesis shows 8%, NOT 8 hits.

Jim Wert
09-03-2010, 09:41 PM
I was able to use this command line search: <~\.\.\.> to find the ellipsis in ESV 1Sa 13:1.
(see recent thread discussing this). I must admit that it took me longer to figure out how to do this than it took Adelphos to export the whole version and search in a word processor.

I found the description of Regular Expressions in BW help a little too cryptic for me to understand, found the Wikipedia article on said expressions to be helpful, gave me enough information to construct the above search.

--Jim

Yaku Lee
09-03-2010, 10:56 PM
One thing that needs to be said however is that your chart showing the stats tab and the hits in Genesis shows 8%, NOT 8 hits.

The drop-down heading of the chart is: "# hits in bk" and the chart reads "Gen (8, 1%). So it means 8 hits in Genesis and the number is 1%, presumably, of total hits (see below).

Other headings and the figures for Gen are:
# vss in bk with hit (7 of 1533)
% vss in bk with hit/vss in bk (0.457%)
% hits in bk/hits in vrsn (1.327%)
% vss in bk with hit/vss in vrsn (1.389%)
% hits in bk/words in bk (0.022%)
% hits in bk/words in vrsn (0.001%)

Here again I am not sure if I am looking at the same stats or not although I made the stats in the same way. Also notice that the number of hits in Gen is 8 or 7.

Regards.

ISalzman
09-03-2010, 11:14 PM
I was able to use this command line search: <~\.\.\.> to find the ellipsis in ESV 1Sa 13:1.
(see recent thread discussing this). I must admit that it took me longer to figure out how to do this than it took Adelphos to export the whole version and search in a word processor.

I found the description of Regular Expressions in BW help a little too cryptic for me to understand, found the Wikipedia article on said expressions to be helpful, gave me enough information to construct the above search.

--Jim

Good for you, Jim. Good stuff. Thanks for the tip.

ISalzman
09-03-2010, 11:16 PM
The drop-down heading of the chart is: "# hits in bk" and the chart reads "Gen (8, 1%). So it means 8 hits in Genesis and the number is 1%, presumably, of total hits (see below).

Other headings and the figures for Gen are:
# vss in bk with hit (7 of 1533)
% vss in bk with hit/vss in bk (0.457%)
% hits in bk/hits in vrsn (1.327%)
% vss in bk with hit/vss in vrsn (1.389%)
% hits in bk/words in bk (0.022%)
% hits in bk/words in vrsn (0.001%)

Here again I am not sure if I am looking at the same stats or not although I made the stats in the same way. Also notice that the number of hits in Gen is 8 or 7.

Regards.

Thanks, Yaku, for clarifying.

Lee
09-04-2010, 10:02 AM
I have never seen this feature, so I thank you for bringing it to my attention. I tried it on the latest installation of BibleWorks 8, and it worked beautifully.
Well, I didn't have any problem running the search on my office desktop. However, for some reason I cannot get the exact same search to work on my laptop, and they are both running Vista.

almather
09-04-2010, 12:15 PM
I played with this this morning for the first time. I have the latest version of BW8 running on XP, and it does not seem to work regardless of what English verses I search.

Al

Lee
09-06-2010, 11:05 AM
Well, I didn't have any problem running the search on my office desktop. However, for some reason I cannot get the exact same search to work on my laptop, and they are both running Vista.
And now it doesn't work on my desktop either. Apparently the last update took away this search function.

Lee
09-27-2010, 06:18 PM
For the life of me, I cannot figure out why this search function sometimes works, and sometimes doesn't. Just a few minutes ago I could not get it to work. It was giving me the message that I needed a period before the tilde. Now it works just fine.

:confused:

bkMitchell
09-28-2010, 08:45 AM
I was able to use this command line search: <~\.\.\.> to find the ellipsis in ESV 1Sa 13:1...

Hey Jim,

thanks for posting this. It's good to know that there is a way in Bibleworks proper to search for ellipsis. It is amazing what Bibleworks can do, but it is not always easy to figure out.

Jim Wert
09-29-2010, 10:48 AM
Please be aware that when you use the copy feature of this forum it can change some of the characters copied. So if you want to use a search string someone has copied, you are safest to go back to the original post.
For example, in the post previous to this one the copied search string displays like this:
"<~|.|.|.>" while the original string was "<~\.\.\.>"

--Jim

Jim Wert
10-09-2010, 03:47 PM
For the life of me, I cannot figure out why this search function sometimes works, and sometimes doesn't. Just a few minutes ago I could not get it to work. It was giving me the message that I needed a period before the tilde. Now it works just fine.

:confused:

Today, not having used it for a while, I tried to use a "regular expression" again, and now it is giving me the old 'could not find the verse reference "~\.\." in the current search version' message, and suggests I use a period before the tilde.
This erratic behaviour is very annoying.