From 81d06e10cb6561467cc71ab1c93ddf9f9994efbb Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Thu, 16 Feb 2017 14:17:01 +1100 Subject: [PATCH] docs: Fix unescaped `[` in character class Compiling the regex as it was documented before results in: > Syntax("Error parsing regex near \'-/:-@[-`{-\' at character offset 7: Use of unescaped \'[\' in character class is not allowed.") --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index f52f1f4957..2dcdad2091 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -430,7 +430,7 @@ These classes are based on the definitions provided in [[:graph:]] graphical ([!-~]) [[:lower:]] lower case ([a-z]) [[:print:]] printable ([ -~]) -[[:punct:]] punctuation ([!-/:-@[-`{-~]) +[[:punct:]] punctuation ([!-/:-@\[-`{-~]) [[:space:]] whitespace ([\t\n\v\f\r ]) [[:upper:]] upper case ([A-Z]) [[:word:]] word characters ([0-9A-Za-z_])