I have two possible example strings:
'Software Sheffield'
and
'Software IN Sheffield'
and I want to split the string if it has the keyword 'IN' in the middle of it.
So for example 1:
var string1 = 'Software Sheffield';
var string2 = '';
and for example 2:
var string1 = 'Software';
var string2 = 'Sheffield';
Can anyone help me achieve this?
So far I have tried:
var string1 = string.split(/[ IN ]+/);
var string2 = string.split(/+[ IN ]/);