Untitled

mail@pastecode.io avatar
unknown
dart
7 months ago
882 B
1
Indexable
Never
 String myHtml =
        '<p><a href="https://www.google.com">link here</a>malik test testasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasd asdasdasdasdasdasd asdasdasdasdasdasd adasd <strong>malik</strong> test test malik test test&nbsp;</p><p>malik test test <u>malik</u> test test malik test test&nbsp;</p><p>malik test test <em>malik</em> test test malik test test&nbsp;</p><p>malik test test <span style="color: rgb(235, 107, 86);">malik</span> test test malik test test&nbsp;</p><p>malik test test <span style="background-color: rgb(26, 188, 156);">malik</span> test test </p>';

    ///////////////////////////////////////////////
    String lines = myHtml.replaceAll('<p>', '').replaceAll('</p>', '');
    log(lines.toString());
    log('----------------------------------');
    final String firstFourLines = '<p> ${lines} </p>';
    log(firstFourLines.toString());