A 23-year-old Buffalo man has admitted to twice trying to rob college students in November on a street near the University at Buffalo’s South Campus, just two weeks after he had been released from prison.

Antoine Matthews, of Martha Avenue, pleaded guilty to two counts of second-degree attempted robbery, according to the Erie County District Attorney’s Office.

Matthews, who has previously been convicted on burglary charges, faces up to seven years in prison on each of the counts when he is sentenced May 1 by State Supreme Court Justice Russell P. Buscaglia, plus additional time in prison because of his parole violation, according to District Attorney Frank A. Sedita III.

Matthews was convicted of trying to rob three UB students at 1:27 a.m. Nov. 17 on Winspear Avenue. He brandished what appeared to be a silver revolver and demanded money. The students ran to the campus and alerted campus police.

Matthews was caught near the intersection of Bailey and Shirley avenues with a silver toy revolver, according to prosecutors.

Assistant District Attorney John Feroleto persuaded the judge to order Matthews to appear in a lineup as part of an investigation into another attempted robbery, which happened about a half an hour before on the same morning involving two female UB students as victims.

Matthews was identified in that lineup, and he pleaded guilty to that charge as well.