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