If you have a comma in your text or pattern, you need to either place it into a %variable or else use string1 $+ $chr(44) $+ string2 etc.
//var %msg Vestibulum ante ipsum primis in faucibus orci
https://www.youtube.com/watch?v=5gGjRcGdELs ipsum primis in faucibus orci luctus et ultrices posuere , %pattern (https:\/\/www\.youtube\.com\/watch\?v=[0-9a-zA-Z-_]{6,20}) | echo -a matches: $regex(%msg,%pattern) 1st capture group: $regml(1)