Girl code

I have a crush but i am friends with his ex, i liked him before they started dating and didnt tell her and now i have liked him for three years is it ok to break girl code to date him if he does like me too. ( even tho he tells everyone who brings it up he doesnt like me... i think )