Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I would expect this script to find lines 2,3,4use strict; use warnings; while(<DATA>) { chomp; if ( /((?!Exception\s+Handler|ExceptionHandler).)*Exception/i ) { print "FOUND : $_\n"; } } __DATA__ Line1: Extension: name="Exception Handler" point="ClientDebugGroupExt +ension" className="com.foo.bar.pluginfwk.extensions.DefaultDebugGroup +Extension" instance=Not created params:( packages="com.foo.bar.common +.ExceptionHandler;" level="Verbose" description="User interface unhan +dled exception handler" ) Line2: java.net.SocketException: Software caused connection abort: rec +v failed Line3: com.mysql.jdbc.CommunicationsException Line4: MESSAGE: Communications link failure due to underlying exceptio +n:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex help needed
by Eliya (Vicar) on Mar 28, 2011 at 18:13 UTC | |
|
Re: regex help needed
by dasgar (Priest) on Mar 28, 2011 at 18:20 UTC | |
by locked_user sundialsvc4 (Abbot) on Mar 28, 2011 at 19:30 UTC | |
|
Re: regex help needed
by samarzone (Pilgrim) on Mar 29, 2011 at 07:57 UTC | |
|
Re: regex help needed
by Anonymous Monk on Mar 28, 2011 at 18:12 UTC |