in reply to what does this regex do?

What this will do is create a variable, $regexpans with a value of /^(big|huge|large)\b.

This is not a regexp, it is a string. However, would you be going to use this as a regexp somehow (in a eval statement probably, I don't know), the regexp would do the following:

Replies are listed 'Best First'.
Re^2: what does this regex do?
by Roy Johnson (Monsignor) on Nov 07, 2005 at 22:19 UTC
    It won't match anything, because the '/' is part of the pattern, and is followed by the beginning-of-string anchor.

    Caution: Contents may have been coded under pressure.
      Quote from self: in a eval statement probably, I don't know

      eval " [...] s${regexpand}foobar/; [...] ";
      This code wil validly substitute any of those three words at the beginning of a string and before a word boundary with 'foobar'. I see no reason for doing this but it is perfectly valid.
      Unless I'm completely wrong of course :p
        Oh, I see. When you said "use this as a regexp", you meant "use part of it as a regexp and part of it as a delimiter." Thanks for clarifying that.

        Caution: Contents may have been coded under pressure.