yahn — 2010-08-23T22:14:32-04:00 — #1
I'm searching for the end of a comment block: str.search("\*/");. 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?
mrhoo — 2010-08-23T22:21:41-04:00 — #2
String.search converts its argument to a regular expression.
Use indexOf to preserve the string, or search(/\\//) or even ('\\\\/').