Regex invalid quantifier

I’m searching for the end of a comment block:“\*/”);. However, I get an error that I have an invalid quantifier which means that the asterisk is being taken as a quantifier and not a character and it is giving an error because nothing precedes the asterisk.

How can I search for the “*/” end of comment sequence without getting an error?

Thank you, converts its argument to a regular expression.
Use indexOf to preserve the string, or search(/\\//) or even ('\\\\/').