#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(?i)(https?:\/\/)?(www\.)?facebook\.com\/group(s)?(\/?\/\d+)?(\/.*)?$"
Local $sString = "Https://wWw.facebook.Com/GROUpS/2233223616820715" & @CRLF & _
"httpS://Www.FACEBOOk.cOm/grouP/2233223616820715/?hoisteD_section_header_type=recentLY_seen&multi_permalinks=2744661819010223" & @CRLF & _
"https://www.facebook.com/groups/ukrainianenglishclubrachk21312Y" & @CRLF & _
"https://www.facebook.com/groups/ukrainianenglishclubrachky/events/fd" & @CRLF & _
"" & @CRLF & _
"Http://wWw.facebook.Com/GROUpS/hhGGGh/22332" & @CRLF & _
"http://Www.FACEBOOk.cOm/grouP/2233223616820715/?hoisteD_section_header_type=recentLY_seen&multi_permalinks=2744661819010223" & @CRLF & _
"httP://www.facebook.com/groups/ukrainianenglishclubrachk21312Y" & @CRLF & _
"http://www.facebook.com/groups/ukrainianenglishclubrachky/events/fd" & @CRLF & _
"" & @CRLF & _
"wWw.facebook.Com/GROUpS/2233223616820715" & @CRLF & _
"Www.FACEBOOk.cOm/grouP/2233223616820715/?hoisteD_section_header_type=recentLY_seen&multi_permalinks=2744661819010223" & @CRLF & _
"www.facebook.com/groups/ukrainianenglishclubrachk21312Y" & @CRLF & _
"www.facebook.com/groups/ukrainianenglishclubrachky/events/fd" & @CRLF & _
"" & @CRLF & _
"facebook.Com/GROUpS/2233223616820715" & @CRLF & _
"FACEBOOk.cOm/grouP/2233223616820715/?hoisteD_section_header_type=recentLY_seen&multi_permalinks=2744661819010223" & @CRLF & _
"facebook.com/group/ukrainianenglishclubrachk21312Y" & @CRLF & _
"facebook.com/groups/ukrainianenglishclubrachky/events/fd"
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