0

I want to get value of html Code comments with javascript. For example:

<code data-type="tb-datalazyload" id="frslistCodeArea">
    <!-- <li class="j_thread_list clearfix"></li>--> 
</code>

I want to get the <li class="j_thread_list clearfix"></li>.


I execute it in chrome. why? who can help me?

enter image description here

Derek 朕會功夫
  • 92,235
  • 44
  • 185
  • 247
Markate Su
  • 33
  • 1
  • 7

1 Answers1

0

Here's an answer to that question:

RegEx for match/replacing JavaScript comments (both multiline and inline)

Just use this RegEx instead:

(<![\-\-\s\w\>]*\-\-\>)
Community
  • 1
  • 1
DoctorLouie
  • 2,699
  • 1
  • 18
  • 23