#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^[^\S\r\n]+artist:[^\S\r\n]*(.*)"
Local $sString = "mp3 @ 0x75b225b8]Estimating duration from bitrate, this may be inaccurate" & @CRLF & _
"[lavf] stream 0: audio (mp3), -aid 0" & @CRLF & _
"[lavf] stream 1: video (mjpeg), -vid 0, " & @CRLF & _
"" & @CRLF & _
"Clip info:" & @CRLF & _
" Release date: Songspk.LINK" & @CRLF & _
" album_artist: Various Artists" & @CRLF & _
" album: Kapoor & Sons (Since 1921)" & @CRLF & _
" artist: Tanishk Bagchi, Arijit Singh & Asees Kaur" & @CRLF & _
"" & @CRLF & _
" composer: Amaal Mallik | Songspk.LINK" & @CRLF & _
" disc: 1/1" & @CRLF & _
" encoded_by: Lame" & @CRLF & _
" genre: Bollywood Music" & @CRLF & _
" title: Bolna - Songspk.LINK" & @CRLF & _
" track: 1/1" & @CRLF & _
" EpisodeID: Songspk.LINK" & @CRLF & _
" copyright: Songspk.LINK" & @CRLF & _
" TOPE: Amaal Mallik | Songspk.LINK" & @CRLF & _
" TIT1: Songspk.LINK" & @CRLF & _
" TIT3: Songspk.LINK"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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