I know that perl compatible regex can do this easily by using the "lookaround" technology, but I only have posix regex on my hand which does not support the "lookaround", so my question is that can I find A but not B on a line only using posix regex.
Here is a simple example:
I want to find a "foo" but no "bar" on a line,
this has a foo # match
i can haz foo # match
but i haz foo and bar # NOT match