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 | |
by cmeyer (Pilgrim) on Jun 28, 2005 at 22:39 UTC |