what is often before a pattern ?

joh12005 at yahoo.fr joh12005 at yahoo.fr
Thu Jun 8 17:22:36 EDT 2006


Hello,

i'm looking for a way to detect sequence objects which are often before
a pattern.

say for example some list like:

a = "a0 a1 a2 a3 a4 myPatternMatchHere".split()
b = "a5 a2 a4 myPatternMatchHere".split()
c = "a6 a7 a2 a3 a8 a4 myPatternMatchHere".split()
d = "a9 a10 a2 myPatternMatchHere".split()

a2 a3 a4 is the most interesting because it appears 2 times upon 4, and
overlap a2 a4, and we have some clues that a2 is also important as it
appears 4/4.

maybe have you some suggestions or idioms where i should look after

best.




More information about the Python-list mailing list