Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: RegEx revision needed

by MCS (Monk)
on Feb 23, 2004 at 16:23 UTC ( [id://331139]=note: print w/replies, xml ) Need Help??


in reply to Re: RegEx revision needed
in thread RegEx revision needed

How about something as simple as:

#!/usr/bin/perl my $text = "Nuera Communications, Inc., ProductFamily: ORCA Series, Pr +oduct: RDT-8, SoftwareVersion: rdtg7.0.4.7, HardwareRevision:"; $text =~ /SoftwareVersion: (.+),/ig; print $1, "\n";

Assuming what you are looking for always starts with the same text. In this case, replacing the Nuera Communications... with Vertical Horizon... does return nothing. Maybe I'm not fully understanding your problem but if it starts with an identifier (like SoftwareVersion) and then is followed by what you want, I think this is the easiest way to get it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-26 01:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found