(?=foo) Lookahead Asserts that what immediately follows the current position in the string is foo
(?<=foo) Lookbehind Asserts that what immediately precedes the current position in the string is foo
(?!foo) Negative Lookahead Asserts that what immediately follows the current position in the string is not foo
(?<!foo) Negative Lookbehind Asserts that what immediately precedes the current position in the string is not foo
P. Pantel, and M. Pennacchiotti. Ontology Learning and Population: Bridging the Gap between Text and Knowledge
, volume 167 of Frontiers in Artificial Intelligence and Applications, IOS Press, (2008)
Y. Li, R. Krishnamurthy, S. Raghavan, S. Vaithyanathan, and H. Jagadish. Proceedings of the 2008 Conference on Empirical Methods in Natural Language Processing
, page 21--30. Honolulu, Hawaii, Association for Computational Linguistics, (October 2008)