Skip to content

Instantly share code, notes, and snippets.

@siumhossain
Last active May 14, 2022 09:48
Show Gist options
  • Save siumhossain/d2b20501d57c9d8ef831a0f6aaebf152 to your computer and use it in GitHub Desktop.
Save siumhossain/d2b20501d57c9d8ef831a0f6aaebf152 to your computer and use it in GitHub Desktop.
remove under score, remove two slash from both side and remove specific word from start
const route = this.$router.history.current.path
const removeUnderScoretitle = route.split('_').join(' ')
const removeAllSlash = removeUnderScoretitle.replace(/\\|\//g,'')
const title = removeAllSlash.replace('category','')
console.log(title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment