#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?sm)\[json]:#\s*\((.*?)^\)"
Local $sString = "[json]:# (" & @CRLF & _
"[" & @CRLF & _
" {"jira": "proj-4753"}," & @CRLF & _
" {"creation": "2021-09-25"}" & @CRLF & _
"]" & @CRLF & _
")" & @CRLF & _
"" & @CRLF & _
"# Title" & @CRLF & _
"" & @CRLF & _
"## 1. Conclusion" & @CRLF & _
"Jada, jada" & @CRLF & _
"" & @CRLF & _
"## 2. Recomendation" & @CRLF & _
"blah, blah" & @CRLF & _
"" & @CRLF & _
"[json]:# (" & @CRLF & _
"[" & @CRLF & _
" {"sensitivity": "internal"}" & @CRLF & _
"]" & @CRLF & _
")" & @CRLF & _
"" & @CRLF & _
"More data" & @CRLF & _
"" & @CRLF & _
"[json]:# (" & @CRLF & _
"[" & @CRLF & _
" {"uid": "abc002334"}" & @CRLF & _
"]" & @CRLF & _
")" & @CRLF & _
"and this"
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