Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: RegEx advice needed

by Anonymous Monk
on Oct 23, 2003 at 19:14 UTC ( [id://301680]=note: print w/replies, xml ) Need Help??


in reply to RegEx advice needed

I made some adjustments and corrected two of the three with:
push @array, $1 if ( /Version:?\s*([^\s;,\n\r]+)/i ); push @array, $1 if ( /SW:?\s*$|SW_REV:?\s*([^\s;,\n\r]+)/ ); push @array, $1 if ( /Rev\s*$|\s+Revision:?\s*([^\s;,\n\r]+)/i ); # OUTPUT IS: # FW: rdtg7.0.4.7 # FW: 0 # FW: CG4D_05.3.02
It's still finding Hardware version first!....any thoughts?

Replies are listed 'Best First'.
Re: Re: RegEx advice needed
by monktim (Friar) on Oct 23, 2003 at 20:23 UTC
    This is getting ugly. This uses your code to work for the given example. I don't know if this is what you really want though.
    push @array, $1 if ( /(?<!Hardware)(?=\s+Version:?\s*([^\s;,\n\r]+))/i + );

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://301680]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-25 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found