To use a character as a delimiter, you have to prepend the corresponding operator to indicate what it is the delimiter of, q for a single quote string, y for a transliteration, m for a matching operation (regex)... The trick is, when perl sees / in a place where it could expect a regex, is guesses that you meant m/. So /(^neuro.*)/ is actually m/(^neuro.*)/ where m means "make / the delimiter for a match operation".
So you should use m?(^neuro.*)?
Edit: oh I thought the m had always been required except for //, turns out there used to be an exception for ?? as well.
In reply to Re: regexp "?" delimiter
by Eily
in thread regexp "?" delimiter
by cmic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |