EUREKA! I figured it out after typing all the stuff below, but figured I'd post it anyway as I am still curious. My issue was that I need the /g flag, and I needed the leading /. With that said, I understand the /g, why is the leading / necessary? What does that do? (EDIT: Also, thanks for the idea about using aliases in two separate calls. Thanks!)


From the help doc:
"$regex([name], text, re)

Returns N, the number of strings in text that matched the regular expression."

With that said, I follow most of your logic, Loki12583, but I just have a few questions:

Are you making the var %regex as the second argument for the $regex call? As in, instead of typing the obfuscated regular expression, you're just typing %regex, yes? If that is the case, why do you have the leading /( and why are you using the +? Assumedly the former is to denote that all contained within the () is the variable's value, but what purpose does the leading slash serve? Also, is the + is to concatenate? Is that necessary?

Last edited by 00000100; 12/09/13 06:07 AM.