in reply to Re: save regex in a file?
in thread save regex in a file?

It is a bummer to hear that. It really seems like a big disadvantage to not be able to specify the delimiter in the file as I know there are "special" delimiters that are sometimes used. It also means that I have to separately ask if there are any operators "ie: case insensitive" as an example...m/abc/i

Would eval() help? I tried the simple case I could think of and it didn't seem to work...

Thanks for ideas!!!

Replies are listed 'Best First'.
Re: Re: Re: save regex in a file?
by chipmunk (Parson) on Oct 16, 2001 at 09:13 UTC
    Using eval would just introduces a whole new bag of worms; I don't think it would be the best solution. Fortunately, you can specify the modifiers within the regex. Here are two quick examples.
    (?i)abc (?s-m:^start.*end)
    The first turns on case-insensitivity for the entire pattern. The seconds turn on single-line matching and turns off multi-line matching for the part of the pattern within the parentheses.

    perlre explains this syntax in more detail.