I know a bit about regex in JS but I can't figure out to match the kind of new lines there is in the text I have.
The context is a get()
call and want to keep only a part of the result :
$.get( "...", { id: "3", name: name } )
.done(function( data ) {
body.append(data.match(/<tr\s+class="hl"\s+>.*<\/tr>/) );
});
So I want to keep only
<tr class="hl" >
<td class="ras fc" >3</td>
<td class="plsa " ><a href="">M</a> </td>
<td class="lefv " >3</td>
<td class="xpm lc" >3</td>
</tr>
From the whole code : Regex ex