#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?sU)(import.+(ExifInterface)).+(new\s\2\(.+\))"
Local $sString = "import android.graphics.Point;" & @CRLF & _
"import android.media.ExifInterface;" & @CRLF & _
"import android.view.WindowManager;" & @CRLF & _
"import java.io.IOException;" & @CRLF & _
"" & @CRLF & _
"public class MediaUtils {" & @CRLF & _
" /* renamed from: a */" & @CRLF & _
" public static float m13571a(String str) {" & @CRLF & _
" if (str == null || str.isEmpty()) {" & @CRLF & _
" throw new IllegalArgumentException("getRotationDegreeForImage requires a valid source uri!");" & @CRLF & _
" }" & @CRLF & _
" try {" & @CRLF & _
" int attributeInt = new ExifInterface(str).getAttributeInt("Orientation", 1);" & @CRLF & _
" if (attributeInt == 3) {" & @CRLF & _
" return 180.0f;" & @CRLF & _
"new ExifInterface(str).getAttributeInt("Orientation", 1);" & @CRLF & _
" }" & @CRLF & _
" if (attributeInt == 6) {" & @CRLF & _
" return 90.0f;" & @CRLF & _
" }" & @CRLF & _
" if (attributeInt != 8) {" & @CRLF & _
" return 0.0f;" & @CRLF & _
" }" & @CRLF & _
" return 270.0f;" & @CRLF & _
" } catch (IOException | StackOverflowError e) {" & @CRLF & _
" e.printStackTrace();" & @CRLF & _
" return 0.0f;" & @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