I'm trying to get any string which is not between two string characters(any string outside two string characters).
I have tried the code below but it keeps giving me 'undefined'.
var string = "start<i>ignore text inside here</i>end"
var string = string.match(/[^<i>(.*)<\/i>]/);
console.log(string)
What I'm expecting to get here is 'start, end'. But when ever I run the code above I'm getting 'undefined' as a result.