in reply to Re: use of constants in regex substitutions?
in thread use of constants in regex substitutions?

Ah, but it doesn't appear that these constants are only being used as the match expression of a regex. For instance, the original code posted is trying to substitute TXT_EXTENSION for MIF_EXTENSION. I don't think the intent is to turn ".txt" into "[.]mif".

--
3dan

  • Comment on Re: Re: use of constants in regex substitutions?

Replies are listed 'Best First'.
Re: use of constants in regex substitutions?
by Abigail-II (Bishop) on Sep 23, 2003 at 15:27 UTC
    Oh, sure, but then your first suggestion, putting them in single quotes isn't going to work either, because I don't think the intent is to turn '.txt' into '\.mif'.

    Abigail

      Quite right! Good thing I recommended the second option... ;-). I maintain that \Q is the right way to do it.

      --
      3dan