updated docs with regex-based before()/after()