Regex in action script

(imported topic written by cj6591)

I have a regex expression that is working fine in my relevance.

Now what I want to do it use that expression in my action script to check multiple versions of expressions (IF/ELSEIF/ELSE) and set a parameter accordingly.

My problem is that the {} in the regex appear to be causing a problem with the execution of the actionscript (as they are embeded inside relevance {}.

How do I make this work?

i.e. parameter “parm1”="{(if (computer name as lowercase=regex "

a-z

{4}\d{2}

a-z

.

") then (“name 1”) elseif (computer name as lowercase=regex "a-z{4}\d{3}a-z.

“) then (“name 2”) else “unknown”)}”

(imported comment written by jessewk)

you can escape the braces by doubling the correct braces. The rules are a little complicated, see here:

http://support.bigfix.com/cgi-bin/kbdirect.pl?id=1230

So try this (untested):

parameter “parm1”="{(if (computer name as lowercase=regex "

a-z

{}\d{4}2}}

a-z

.

") then (“name 1”) elseif (computer name as lowercase=regex "a-z{4}}\d{3}}a-z.

“) then (“name 2”) else “unknown”)}”

(imported comment written by cj6591)

sweet … that worked great.

Thanks so much!