[rt-users] help with scrip
Gene LeDuc
gleduc at mail.sdsu.edu
Fri Oct 17 12:24:47 EDT 2008
Hi Violetta,
Try this:
if ( $self->TransactionObj->Type eq "Create" &&
! ( $self->TicketObj->Subject =~ /proje[c|k]t: /i ||
$self->TicketObj->Subject =~ /akut: /i ) )
Regards,
Gene
At 02:59 AM 10/17/2008, Violetta Wawryk wrote:
>Hi,
>
> >> > if ($self->TransactionObj->Type eq "Create" &&
> >> > ($self->TicketObj->Subject !=~ /[P|p]roje[c|k]t: / ||
> >> > $self->TicketObj->Subject !=~/[A|a]kut: / ) )
> >
> > I'm pretty sure that && is a higher precedence than ||, so the result
> > without parentheses would be the same as ( ( A && B ) || C ) instead of
> > ( A && ( B || C )) which is what you described.
>
>I understand that now. Thank you. But I found out my scrip is not working
>because of the wrong regex.
>
>$self->TicketObj->Subject !=~ /[A|a]kut: / --> doesn't work
>$self->TicketObj->Subject !~ /[A|a]kut: / --> doesn't work
>
>what would be the right expression to make it negative?
>
>$self->TicketObj->Subject =~ /[A|a]kut: / --> does work for positiv
>
>Thanks
>Violetta
--
Gene LeDuc, GSEC
Security Analyst
San Diego State University
More information about the rt-users
mailing list