irule error

When I enter the following iRule I get an error:

01070151:3: Rule [/Common/temp] error: /Common/temp:2: error: [parse error: PARSE missingBracket 34 {missing close-bracket}][{ not [class match [IP::addr [IP::client_addr] equals some-dg] }]

when CLIENT_ACCEPTED { if { not [class match [IP::addr [IP::client_addr] equals some-dg] } { reject } }

Fixed, if I’m correct, a ] was missing in the if condition

when CLIENT_ACCEPTED { 
 if { not [class match [IP::addr [IP::client_addr]] equals some-dg] } { 
   reject 
 } 
}