#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?<!\.)(\b[a-zA-Z_]+[a-zA-Z0-9_]+)\.[a-zA-Z0-9_\.]+"
Local $sString = "module.func()" & @CRLF & _
"module.class.func()" & @CRLF & _
"module.module.class . func()" & @CRLF & _
"__module__.module.class.func()" & @CRLF & _
"" & @CRLF & _
"module.constant" & @CRLF & _
"module.class.constant" & @CRLF & _
"module.class.class.constant" & @CRLF & _
"" & @CRLF & _
"module11.func()" & @CRLF & _
"modu123le.class.func()" & @CRLF & _
"modu123le.module.class.func()" & @CRLF & _
"modu123le.module123.class.func()" & @CRLF & _
"" & @CRLF & _
""1 if module11.func(col) == 'A' else 3"" & @CRLF & _
""1 if module11.func(col) == 'A' else ( _module.constant == 'B') else 34"" & @CRLF & _
"" & @CRLF & _
""module.func()"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"1.0 " & @CRLF & _
"1module.func() " & @CRLF & _
"2module.class.func()" & @CRLF & _
"col.upper() ##No way to know whether col is a module " & @CRLF & _
"" & @CRLF & _
"module . func() ##Need to remove spaces before and after ." & @CRLF & _
"module . class . func() " & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
""
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