Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. use regex::{ Regex, Captures };
  2.  
  3. fn main() {
  4. let re = Regex::new( r#"(\.\.|\\\\|\?|%|`|\*|\|<|>)"# ).expect( "shit" );
  5. let m = r#"../.`./mauveweasel/options/config.toml"#;
  6.  
  7. let result = re.replace_all( m, | captures: &Captures | {
  8. ""
  9. } );
  10.  
  11. println!( "{}", result );
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement