diff --git a/CHANGELOG.md b/CHANGELOG.md index 2db86880f0..abd906fc3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +TBD +=== + +Bug fixes: + +* [BUG #523](https://github.com/rust-lang/regex/pull/523): + Add note to documentation that spaces can be escaped in `x` mode. + + 1.3.7 (2020-04-17) ================== This release contains a small bug fix that fixes how `regex` forwards crate diff --git a/src/lib.rs b/src/lib.rs index 2a74bf8185..649995bdca 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -152,8 +152,9 @@ assert_eq!(after, "03/14/2012, 01/01/2013 and 07/05/2014"); ``` If you wish to match against whitespace in this mode, you can still use `\s`, -`\n`, `\t`, etc. For escaping a single space character, you can use its hex -character code `\x20` or temporarily disable the `x` flag, e.g., `(?-x: )`. +`\n`, `\t`, etc. For escaping a single space character, you can escape it +directly with `\ `, use its hex character code `\x20` or temporarily disable +the `x` flag, e.g., `(?-x: )`. # Example: match multiple regular expressions simultaneously