#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(<(?!(li|ul))[^>]+) style=".*?""
Local $sString = "<p class="BodyTextIndent3">" & @CRLF & _
" <strong>[To do]</strong> Style we need to have work in Tech zone: “Body Text Indent 2” so that we can indent paragraphs under a sub-step or sub-bullet, such as a paragraph containing a graphic." & @CRLF & _
" </p>" & @CRLF & _
" <ul style="margin:0pt; padding-left:0pt">" & @CRLF & _
" <li class="ListParagraph" style="margin-left:27.14pt; text-indent:0pt; padding-left:8.86pt; font-family:serif">" & @CRLF & _
" <span style="font-family:'Metropolis Light'">This is a first-level bullet item (that works right now) created by using the </span><strong><span style="font-family:'Metropolis Light'; ">List Paragraph and then clicking the Bullet button in the toolbar</span></strong><span style="font-family:'Metropolis Light'">. Then, if you want to create sub-bullets, just also press the Tab key, like this:</span>" & @CRLF & _
" <ul style="margin-right:0pt; margin-left:0pt; padding-left:0pt">" & @CRLF & _
" <li class="ListParagraph" style="margin-left:28.4pt; text-indent:0pt; padding-left:7.6pt">" & @CRLF & _
" <span style="font-family:'Metropolis Light'">This is a sub-bullet by using the </span><strong><span style="font-family:'Metropolis Light'; ">List Paragraph style, using a bulleted list and then pressing Tab</span></strong><span style="font-family:'Metropolis Light'">. If you press Return now, you will get another sub-bullet.</span>" & @CRLF & _
" <ul style="margin-right:0pt; margin-left:0pt; padding-left:0pt">" & @CRLF & _
" <li class="ListParagraph" style="margin-left:27.12pt; text-indent:0pt; padding-left:8.88pt">" & @CRLF & _
" <span style="font-family:'Metropolis Light'">This is a sub-bullet by using the </span><strong><span style="font-family:'Metropolis Light'; ">List Paragraph style, using a bulleted list and then pressing Tab twice</span></strong><span style="font-family:'Metropolis Light'">. If you press Return now, you will get another sub-sub-bullet.</span>" & @CRLF & _
" </li>" & @CRLF & _
" </ul>" & @CRLF & _
" </li>" & @CRLF & _
" </ul>" & @CRLF & _
" </li>" & @CRLF & _
" </ul>" & @CRLF & _
" <p class="BodyText">" & @CRLF & _
" Following are some examples taken from the RA appendixes. We need enough styles so that we can get these to work on Tech zone:" & @CRLF & _
" </p>" & @CRLF & _
" <p class="BodyText">" & @CRLF & _
" To configure the cluster quorum settings:" & @CRLF & _
" </p>" & @CRLF & _
" <ol style="margin:0pt; padding-left:0pt">" & @CRLF & _
" <li class="ListParagraph" style="margin-left:33.8pt; text-indent:0pt; padding-left:2.2pt">" & @CRLF & _
" Configure quorum votes for Site 1:" & @CRLF & _
" <ol style="margin-right:0pt; margin-left:0pt; padding-left:0pt; list-style-type:lower-latin">" & @CRLF & _
" <li class="ListParagraph" style="margin-left:33.8pt; text-indent:0pt; padding-left:2.2pt">" & @CRLF & _
" Open Failover Cluster Manager and select<span style="font-family:Cambria"> </span><strong>More Actions</strong><span style="font-family:Cambria"> </span>><span style="font-family:Cambria"> </span><strong>Configure Cluster Quorum Settings</strong>." & @CRLF & _
" </li>" & @CRLF & _
" <li class="ListParagraph" style="margin-left:33.8pt; text-indent:0pt; padding-left:2.2pt">" & @CRLF & _
" Complete the Configure Cluster Quorum Wizard, using the following guidelines:" & @CRLF & _
" </li>" & @CRLF & _
" </ol>" & @CRLF & _
" </li>" & @CRLF & _
" </ol>"
Local $sSubst = ""
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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 AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm