Skip to content

Commit

Permalink
Bug fix: Make alphanumeric into non-alphanumeric.
Browse files Browse the repository at this point in the history
Signed-off-by: Aalekh Patel <[email protected]>
  • Loading branch information
aalekhpatel07 committed Jun 14, 2022
1 parent d28686c commit a908f07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions text-cleaner/src/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub(crate) mod re {
pub const ALL_PUNCTUATION: &str = r"[^\w\s]";

/// A pattern that matches all al
pub const ALPHANUMERIC: &str = r"[\w]";
pub const ALPHANUMERIC: &str = r"[^\w]";

pub const NON_ASCII: &str = r"[^\x00-\x7F]";

Expand Down Expand Up @@ -200,4 +200,4 @@ pub mod tests {
let expected = String::from("hi ");
assert_eq!(observed, expected);
}
}
}

0 comments on commit a908f07

Please sign in to comment.