#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(?!Vol)(?!Chapter)(?<Series>.+?)(-|_|\s|#)\d+(-\d+\b)?(.+?(?=\s+->))?"
Local $sString = "Test cases:" & @CRLF & _
"Kodoja #001 (March 2016) -> Kodoja" & @CRLF & _
"Bleach 001-002 -> Bleach" & @CRLF & _
"[BAA]_Darker_than_Black_Omake-1 -> [BAA]_Darker_than_Black_Omake" & @CRLF & _
"" & @CRLF & _
"Edge cases:" & @CRLF & _
"The Archmage Returns After 4000 Years -> The Archmage Returns After" & @CRLF & _
"See You in My 19th Life -> See You in My" & @CRLF & _
"The Return of the 8th Class Mage -> The Return of the" & @CRLF & _
"Kaiju No. 8 -> Kaiju No." & @CRLF & _
"Zom 100 - Bucket List of the Dead -> Zom"
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