I have three string and i need to check if one of them contains the other 2 in the same order given, right now i am using alot of conditions to achive this, is there a way to simplify it using regex?
here is the code:
var a = '**';
var b = '##';
var phrase = '**Lorem ipsum dolor sit amet##';
if(phrase.includes(a) && phrase.includes(b) && (phrase.indexOf(a) < phrase.indexOf(b))) {
// add logic
}