#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi)((?:gpa[ :]+)(\d\.?\d{0,2})(?:[/\d\. ]{0,6})?)|((\d\.?\d{0,2})(?:[/\d\. ]{0,6})? ?(?:gpa))"
Local $sString = "GPA 3.75/4.00" & @CRLF & _
"GPA 3.75/4.0" & @CRLF & _
"GPA 3.75 /4.0" & @CRLF & _
"GPA 3.75 / 4.0" & @CRLF & _
"GPA 3.7 / 4 aaa" & @CRLF & _
"Major GPA: 3.6/4.0" & @CRLF & _
"GPA 3.1" & @CRLF & _
"GPA 3" & @CRLF & _
"some text GPA 3" & @CRLF & _
"3.25/4.0 GPA" & @CRLF & _
"some text 3.26 / 4.0 GPA" & @CRLF & _
"Minor in Art and Technology - 3.5/4.0 GPA aaaa" & @CRLF & _
"Minor in Art and Technology - 3.5 / 4.3 GPA aaaa" & @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