Regex pattern help for phrase OR a character set

Posted by andybaird on Stack Overflow See other posts from Stack Overflow or by andybaird
Published on 2010-05-31T05:29:49Z Indexed on 2010/05/31 5:32 UTC
Read the original article Hit count: 403

Filed under:
|

I have a PHP regex that I want to fail if the matched word after /blog is just "feed".

This MUST be done within the regex itself, not using any other PHP syntax.

The regex currently looks like this:

blog/([a-zA-Z0-9-]+)

What would I add to this to properly negate the regex if "feed" is found after blog/ ?

© Stack Overflow or respective owner

Related posts about php

Related posts about regex