searching substrings with interpositions

borges2003xx at yahoo.it borges2003xx at yahoo.it
Tue May 24 05:17:33 EDT 2005


hi everyone.
a problem:
two binary strings, a="0101" b="000011110100";
i search a function f(a,b) that gives 1 if a is "contained" in b with
any sub strings interposed.
in this example a in contained cause 000<01>111<01>00 but also
0<0>001111<101>00"
 but also <0>0001111<101>00 but also 000<0>1111<01>0<0> etc....
any idea?
Thanx in advance.
Giorgi Borghi




More information about the Python-list mailing list