Code looks right to me, but what I can't figure out why it's not working for me?

Code:
if ($regex([Ss]?)(\d{1,2})([xXeE\.\-])(\d{1,2}) isin $1-) {
  //echo -a TV Show Detected : $1-
}


Quote:
* Invalid parameters: $regex


I've been trying various ways to get it to work but no luck since last night - right now i'm having a bit of a headache! - lol
I possibly have a dementia - coding is like way past my time frown