Regex in Rust

Get to know regular expression in Rust.

regex = "1.4.2"
use regex::Regex;
let re = Regex::new(r"first: \d+").unwrap();
assert_eq!(re.replace(", offset: 0, first: 20, filter: $filter","first: 1"),", offset: 0, first: 1, filter: $filter");

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store