Implement re2post in Rust