On 11 June 2014 13:23:14 BST, BrJohan <brjo...@gmail.com> wrote:
>For some genealogical purposes I consider using Python's re module.
>Rather many names can be spelled in a number of similar ways, and in
>order to match names even if they are spelled differently, I will build
>regular expressions, each of which is supposed to match a number of
As has been mentioned, you probably want to look at fuzzy matching algorithms
rather than aiming at regular expressions, although a quick search suggests
there has been some work on fuzzy matching with regular expressions.
>Now, my problem: Is there a way to decide whether any two - or more -
>those regular expressions will match the same string?
If your regexes are truly regular expressions (see *) then they represent
regular languages, which are really sets. The intersection of these, is
another regular language. If you test the string against this it will also
match both original languages.
(*this only mentions back references, but I think the look-ahead/behind
assertions are also non-regular)
Sent from Kaiten Mail. Please excuse my brevity.