Answers for "Find a character between space with Regex in js"

0

Find a character between space with Regex in js

const text = 'Whatever - this is'
let re = new RegExp('\\ – ', 'gm') //or '\s–\s'
//This return an array of  string(s) if the match is found
console.log(text.match(re))
Posted by: Guest on April-20-2022

Code answers related to "Find a character between space with Regex in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language