Help with Regular Expressions

danw700

Member
Messages
39
I'm having problems with regular expressions. Sword Searcher can't understand my feeble attempts at complex searches. Does someone have a table and examples of regular expressions that can be used in this program?

[a-z]&eth

I thought that this ought to find any word that ends in "eth" but I can't get regular expressions as I understand them to work. Of course, I'm a complete novice at complicated searching :). I used to be immensely happy that I could get free from a printed concordance and look for a combination of any 2 words. Now I need to refine my search results in a much more meaningful way.


Any help would be greatly appreciated

cheers for now

Dan
 
The ampersand is a literal character in a RegEx string, so it is trying to match words with an ampersand before the eth. There are some other problems with your RegEx (it doesn't specify any anchors so it would match in the middle of words, too).

A RegEx search in this case is overkill. You can accomplish your goal with a normal Bible search for *eth. The * is a wildcard in a normal search. Just type "*eth" in the main search box (without the quotes).

You can review the advanced search options for SwordSearcher in this part of the manual: http://www.swordsearcher.com/helpfiles/current/advanced_search_expressions.html

The best place to learn regular expressions is http://www.regular-expressions.info/ (not my website), but typically these kinds of searches are not necessary since the regular search function is already tailored for flexible searching of Bible text.
 
Last edited:
You would also need a + after the [a-z] in your example (to indicate one or more) unless you only wanted all the 4 letter words that end in eth. You would also want a \b at the end to indicate a word boundary, otherwise you would get something at the beginning then an eth and then possibly some characters at the end. Try it with and without the \b

[a-z]+eth\b
 
Thanks for that. I get mixed up with the different types of regular expressions :)


I'm actually trying to find out if the specialised verb endings "eth" "th" "est" & "st" that are used for 3rd and 2nd person pronoun singular are ever used for the 3rd and 2nd person pronoun plural.


I've had to give myself a crash course in regular expressions :). I'm working on a piece on grammar of the KJV.


Thanks for your help
Dan
 
The ampersand is a literal character in a RegEx string, so it is trying to match words with an ampersand before the eth. There are some other problems with your RegEx (it doesn't specify any anchors so it would match in the middle of words, too).

A RegEx search in this case is overkill. You can accomplish your goal with a normal Bible search for *eth. The * is a wildcard in a normal search. Just type "*eth" in the main search box (without the quotes).

You can review the advanced search options for SwordSearcher in this part of the manual: http://www.swordsearcher.com/helpfiles/current/advanced_search_expressions.html

The best place to learn regular expressions is http://www.regular-expressions.info/ (not my website), but typically these kinds of searches are not necessary since the regular search function is already tailored for flexible searching of Bible text.

Unfortunately that link http://www.regular-expressions.info/ doesn't seem to work for me. I've tried it lots of times. It's the EditPad website I think, all part of it. I really didn't want to spend a heap more money :).


Cheers for now
Dan
 
thanks says it is up but I just spin when linking to it - I suppose I could try with YOR to see if it is region blocked - strange
thanks Dan
 
Back
Top