A small example of using regex within mIRC:

Code
var %test_text = Vestibulum ante ipsum primis in faucibus orci https://www.youtube.com/watch?v=5gGjRcGdELs ipsum primis in faucibus orci luctus et ultrices posuere https://www.youtube.com/watch?v=dQw4w9WgXcQ

;; Note: \Q...\E escapes an entire block of a regex pattern so individual characters do not need to be escaped
var %pattern = /(\Qhttps://www.youtube.com/watch?v=\E[0-9a-zA-Z-_]{6,20})/ig

;; Test if the text has a yt link: $regex()
;; This also returns the number of times the regex matched in the string
echo -a HasYouTubeLink: $regex(hasytlink, %test_text, %pattern)

;; Get the number of matches
echo -a Number of Youtube Links: $regml(hasytlink, 0)

;; Get first match
echo -a First Link: $regml(hasytlink, 1)

;; Get second link
echo -a Second Link: $regml(hasytlink, 2)


I am SReject
My Stuff