I have a string in my js code, that actually is an html code.
It's started with <li class='list__item item item_archive'>
This works fine:
liMatches=s.match(/(<li[A-Za-z\s_=\']+>...$/);
where s
is html string. Now I need to use RegExp object.
liMatchesRegex=new RegExp("<li[\s]+");
I create this object (I tried <li[A-Za-z\s_=\']+>
too).
liMatchesConcat=s.match(liMatchesRegex);
shows me null
It works only with liMatchesRegex=new RegExp("<li");
What's wrong?