http://www.experts-exchange.com/Web/..._20717070.html
questo fa al caso tuo...basterà sostituire != con <