#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "^(http(s)?:\/\/)?(([\w\.]+)\.(?:com|cn|love|net|com\.cn|org)[\/#!%\w&?\-=~.+]*)$"
Local $sString = "https://mp.weixin.qq.com/s?__biz=MzAxNjczMTQxMA==&mid=504131096&idx=1&sn=c2fe41152807821b7916fa9539a0cf87&scene=1&srcid=0718JR98ETFngTl6mDsNRfhK&key=77421cf58af4a65374324bd2f16d7fdd913230b5ab4bd48a72759cc99919893795265ff20c0c8a79c676e636f789899c&ascene=0&uin=MjAzOTExMTUxMg%3D%3D&devicetype=iMac15%2C1+OSX+OSX+10.11.5+build(15F34)&version=11020201&pass_ticket=kA76WNrCKCEZ3JyEii3tYs88BCmLEM%2FI4LPD%2FtHBzoPjYzI9t7seUadtUUVQ9677"
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