#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)<[pP]-([a-zA-Z-]+)([^>]*)?>[\s\n]*<\/[pP]-\1>"
Local $sString = "<p-button type="submit" [outlined]="true" label="FILTRAR" icon="pi pi-search"[outlined]="true" [outlined]="true">" & @CRLF & _
"</p-button>" & @CRLF & _
"<p-button[outlinued]="true"></p-gfwefew>" & @CRLF & _
"<p-button/>" & @CRLF & _
"<p-input pInputNumber></p-input>" & @CRLF & _
"<p-button" & @CRLF & _
"[outlinued]="true"></p-button>" & @CRLF & _
"<p-button [outlinued]="true" label="FILTRAR" icon="pi pi-search"></p-button>" & @CRLF & _
"<p-calendar [outlinued]="true" label="FILTRAR" icon="pi pi-search"></p-calendar>" & @CRLF & _
"<p-button></p-button>" & @CRLF & _
"<p-BUTTON [outlined]="true"" & @CRLF & _
" label="FILTRAR" " & @CRLF & _
"icon="pi pi-search">" & @CRLF & _
"</p-BUTTON>" & @CRLF & _
"<p-autoComplete id="populationCategoriesID" formControlName="populationCategoriesID"" & @CRLF & _
" [suggestions]="filtered['populationCategory']"" & @CRLF & _
" (completeMethod)="filterMutiple($event,'populationCategory')" field="name" [multiple]="true"" & @CRLF & _
" [showEmptyMessage]="true">" & @CRLF & _
" </p-autoComplete>" & @CRLF & _
"" & @CRLF & _
""
Local $sSubst = "<p-$1$2/>"
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