in reply to Match all emails from all subdomains for a domain except one..

Why not do it by a split instead of a regex? Is that against the rules too?

($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print
  • Comment on Re: Match all emails from all subdomains for a domain except one..
  • Download Code

Replies are listed 'Best First'.
Re: Re: Match all emails from all subdomains for a domain except one..
by ehdonhon (Curate) on Aug 09, 2003 at 02:37 UTC
    Yes, it has to be one regex... basically I'm using some third-party software (which I don't want to have to hack) that wants me to provide it with the contents of a regular expression in a config variable so that it can use it later for substitution. Something like this:
    # IN the config file $regexp = '@example.com'; $replacement = '@other.com'; # Many places nestled in the code $mail = s/$regexp/$replacement;

    I think I found what I was looking for. Thanks to all.