# mdbook-regex-replacer **Repository Path**: blazh/mdbook-regex-replacer ## Basic Information - **Project Name**: mdbook-regex-replacer - **Description**: mdbook 的 preprocessor , 能使用 regex.replace_all() 替换掉所有 chapter 的 content - **Primary Language**: Rust - **License**: MPL-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-03-18 - **Last Updated**: 2022-07-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: Rust, mdbook ## README # mdbook-regex-replacer > this is a preprocessor which invoke regex.replace_all() to replcae all chapter content ## quick start ### install mdbook-regex-replacer ```shell script cargo install mdbook-regex-replacer ``` ### configure book.toml ```toml [book] authors = ["blazh"] language = "en" multilingual = false src = "src" title = "test" # add into your book.toml [preprocessor.regex-replacer] command="mdbook-regex-replacer" # add your regex rule # use crates regex # https://crates.io/crates/regex # https://docs.rs/regex/1.4.3/regex/#example-replacement-with-named-capture-groups [[preprocessor.regex-replacer.items]] regex="==(?P.+?)==" rep="$c" ```