in reply to Re: Getting regexp from Regexp references
in thread Getting regexp from Regexp references
Actually, it's "(?OPT-NOPT:PAT)", including the colon, which is a variation on the old familiar theme of "(?:PAT)". The hyphen and following negated options are optional.(?-xism:^foo\.c$)That is a perfectly valid regexp. The (?- allows one to specifiy regexp option inside the regexp pattern itself.
I'll give a somewhat more detailed example:
as a string isqr/^foo.*\.c$/si
Thus: the enabled options come right after the question mark, disabled options come after that, between a hyphen and the colon.(?si-xm:^foo.*\.c$)
These are the only four options that can actually be used in this manner. Thus: the list of options is complete.
|
|---|