I am trying to produce a regex for apache which will ignore certain strings, and can use other things. Ive attempted a variety of techniques however cannot appear to have it correct.

for instance

i would like it to ignore

ignore.mysite.com

but other things i would like it to use

*.mysite.com

If you prefer a regex that suits whatever.mysite.com where whatever is any possible hostname, however, you want the regex to not match ignore.mysite.com, then do this:

^(?!ignore)[a-z0-9-]+\.mysite\.com

The secret is by using negative lookahead.

If you would like this regular expressions for mod_rewrite, you should use RewriteCond with negation, much like this:

   RewriteCond %{REMOTE_HOST}  !^ignore.example.com$
   RewriteRule ....

You'll find more, obviously, in documentation.