find match between Oi and rule Rj