Law 12:
"SERIOUS FOUL PLAY

A tackle or challenge that endangers the safety of an opponent or uses excessive force or brutality must be sanctioned as serious foul play.

Any player who lunges at an opponent in challenging for the ball from the front, from the side or from behind using one or both legs, with excessive force or endangers the safety of an opponent is guilty of serious foul play."

Sweeping the legs away from a running player with no intent (or possibility) of getting the ball must endanger the player, but not according to that ref.