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 朕會功夫
  • 88,688
  • 41
  • 174
  • 241
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,688
  • 1
  • 17
  • 23