in reply to Regexp matching blues

Your second regex in _extractInfoFromMsg() isn't matching (regex wants "NUMBER", data says "NUM"), so $1 still has the value that the first regex set it to.

You could do something like:
if ( $_ =~ /OLD TICKET NUMBER-+\[(.*?)\]/ ) { $fields{OLD_TICKET_NUMBER} = $1; } else { $fields{OLD_TICKET_NUMBER} = 'NOT FOUND'; }

-Colin.

WHITEPAGES.COM | INC

Replies are listed 'Best First'.
Re^2: Regexp matching blues
by punkish (Priest) on Jun 28, 2005 at 22:31 UTC
    I am embarassed, shame-faced, and ashamed. I am going to go and shave my head off leaving only a thin wedge sticking out in the middle. Please, don't anyone else bother wasting your time replying to this stupid thread.

    By the way, cmeyer, much gratitude to you for slapping me out of my glazed stupor.

    --

    when small people start casting long shadows, it is time to go to bed
      I think that I'll go and ... not shave my head at all. :)

      -Colin.

      WHITEPAGES.COM | INC