#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(?i)(?<=,|^)(?:(?!\b(?:city|disc?trict|street|plaza|square|tower|block|mansion|garden|house|building)\b)[^,])*(?=,|$)"
Local $sString = "big fake plaza, 12 this street, district, city" & @CRLF & _
"Green mansion, district, city" & @CRLF & _
"Block 7c of orange building district, city" & @CRLF & _
"98 main street block a blue plaza, city" & @CRLF & _
"tower 10, caribbean coast, district" & @CRLF & _
"block 3a, the latitude, city" & @CRLF & _
"blue red mansion, 46 pearl street, city" & @CRLF & _
"dorsett hotel, city" & @CRLF & _
"block 9, Willowland, disctrict, city " & @CRLF & _
"tower 2, the coronation, 1 fake street, district" & @CRLF & _
""
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