#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?![ab]\/)(([^ \t\n\r\f\v:\"])+?\.(html|py|css|js|txt|xml|json|vue))(\". line |:|\n| )(([0-9]+)*)"
Local $sString = "diff --git a/src/give/forms.py b/src/give/forms.py" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" M give/locale/fr/LC_MESSAGES/django.po" & @CRLF & _
" M agive/models/translation.py" & @CRLF & _
" M give/views.py" & @CRLF & _
"" & @CRLF & _
"Some problem at give/widgets.py:103" & @CRLF & _
"" & @CRLF & _
"Traceback (most recent call last):" & @CRLF & _
" File "/usr/lib/python3.10/unittest/case.py", line 59, in testPartExecutor" & @CRLF & _
" yield" & @CRLF & _
" File "/usr/lib/python3.10/unittest/case.py", line 587, in run" & @CRLF & _
" self._callSetUp()" & @CRLF & _
" File "/usr/lib/python3.10/unittest/case.py", line 546, in _callSetUp" & @CRLF & _
" self.setUp()" & @CRLF & _
" File "/home/projects/src/give/tests/test_models.py", line 14, in setUp" & @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