# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/(\/sites(?:\/[^\/\"]+){2}\/SitePages\/[^\/\"]+)\.aspx(?=\")/$1.html/gm;t' <<< "<div class=\"ms-wikicontent ms-rtestate-field\" style=\"padding-right: 10px\"><div class=\"ExternalClass8E56354CC4314DBA861E187B689F3A2B\"><table id=\"layoutsTable\" style=\"width:100%\"><tbody><tr style=\"vertical-align:top\"><td style=\"width:100%\"><div class=\"ms-rte-layoutszone-outer\" style=\"width:100%\"><div class=\"ms-rte-layoutszone-inner\" role=\"textbox\" aria-haspopup=\"true\" aria-autocomplete=\"both\" aria-multiline=\"true\"><a id=\"0::Home|Home\" class=\"ms-wikilink\" href=\"/sites/Team/Project/SitePages/Home.aspx\">Home</a> - <a id=\"1::Jenkins|Jenkins\" class=\"ms-wikilink\" href=\"/sites/Team/Project/SitePages/Jenkins.aspx\">Jenkins</a><h1 class=\"ms-rteElement-H1\">Jenkins Integration with Deployment Tools</h1>"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html