Skip to content

Instantly share code, notes, and snippets.

@Angelfire
Last active November 27, 2016 15:47
Show Gist options
  • Save Angelfire/7304a77f8fbb6ae4d0867ed73228fad9 to your computer and use it in GitHub Desktop.
Save Angelfire/7304a77f8fbb6ae4d0867ed73228fad9 to your computer and use it in GitHub Desktop.
replace using regex
let format = 'BLACK: 5:00 MIN/KM';
format.replace(/MIN|KM|MI/gi, $1 => $1.toLowerCase());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment