You can't. You need a structural formula to identify a peroxy group.
Consider the molecular formula C₂H₄O₃.
This could represent either hydroxyacetic acid
or peroxyacetic acid
or methyl peroxyformate
The latter two structures contain peroxy groups, but you need more information than the molecular formula to decide which compound you have.