#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?<!(?=(((f|ht)tps?)\:\/\/?)(www\.?)))Nissan(?![^<\s]+)(?=[^<>]*<)(?!(?:(?!</?(?:a|span)[ >/])(?:.|\n))*</(?:a|span)>)"
Local $sString = "You know odoo become now http://www.odoo.com. " & @CRLF & _
"Nissan is car manufacter odoocompany." & @CRLF & _
"" & @CRLF & _
"<p>Nissan</p>" & @CRLF & _
"<p>Nissan is company and Nissan Micra is product</p>" & @CRLF & _
"<p><a href="www.Nissan.com">Nissan</a> is company and <span><a href="www.Nissan.com">Nissan</a></span> Micra is product</p>" & @CRLF & _
"" & @CRLF & _
"<p><span>Nissan</span></p>" & @CRLF & _
"<p>Nissan is product <a href="nissan.com">Nissan</a> ignore Nissan</p>" & @CRLF & _
"<p><a href="nissan.com"><span>Nissan</span></a></p>" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"<p>odoo is a name Company and Nissan Micra is a model of best selling.</p>" & @CRLF & _
"Company Nissan is a name. and Nissan Micra is model name. " & @CRLF & _
"Company <a href="nissan.com"><span>Nissan</span></a> is a name. and Nissan Micra is model name. " & @CRLF & _
"This is new <a href='https://www.url.com'><span>URL</span></a>.<br /> Company Nissan is a name. and Nissan Micra is model name. </p>"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
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