-1
如何解析html到實體數組中?角度解析html到數組
例如: 'hello <strong>man</strong>
'=> [ 'hello
', '<strong>
', 'man
', '</strong>
']
如何解析html到實體數組中?角度解析html到數組
例如: 'hello <strong>man</strong>
'=> [ 'hello
', '<strong>
', 'man
', '</strong>
']
我最終使用的split
操作員像這樣:htmlString.split(/(<[^<>]*>)/)
。