docs for regex-based before() and after()