#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(compile|testCompile|implementation|testImplementation|compileOnly|runtime|testRuntime|[a-zA-Z0-9_]{1,100})\sgroup\:\s['"](.*)['"],\sname\:\s['"](.*)['"],\sversion\:\s['"](.*)['"]|(compile|testCompile|implementation|testImplementation|compileOnly|runtime|testRuntime|[a-zA-Z0-9_]{1,100})\s['"](.*):(.*):(.*)['"]|(compile|testCompile|implementation|testImplementation|compileOnly|runtime|testRuntime|[a-zA-Z0-9_]{1,100})\(['"](.*):(.*):(.*)['"]\)"
Local $sString = "compile group: 'commons-net', name: 'commons-net', version: '3.1.2'" & @CRLF & _
"testCompile group: 'org.spockframework', name: 'spock-core', version: '2.0-M1-groovy-3.0'" & @CRLF & _
"implementation group: 'commons-net', name: 'commons-net', version: '3.7.2'" & @CRLF & _
"testImplementation group: 'org.spockframework', name: 'spock-core', version: '2.0-M4-groovy-3.0'" & @CRLF & _
"implementation "org.apache.httpcomponents:httpclient:latest.release"" & @CRLF & _
"implementation 'org.apache.httpcomponents:httpclient:1.0.0'" & @CRLF & _
"compile "com.h2database:h2:1.4.197"" & @CRLF & _
"compile("com.github.bkenn:kfoenix:0.1.2-SNAPSHOT")" & @CRLF & _
"compile group: "com.jfoenix", name: "jfoenix", version: "8.0.7"" & @CRLF & _
"compile "org.jooq:jooq:3.11.5"" & @CRLF & _
"jooqRuntime('com.h2database:h2:1.4.197')" & @CRLF & _
"jooqRuntime("com.h2database:h2:1.4.197")" & @CRLF & _
"jooqRuntime 'com.h2database:h2:1.4.197'" & @CRLF & _
"jooqRuntime "com.h2database:h2:1.4.197""
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