The regex doesn't need to change at all. What matters is you store it in a a variable. You can't use the string directly in $regex when it contain a comma because mIRC uses a comma to delineate parameters.