in reply to RegEx revision needed

sorry, I forgot to mention that I'm parsing out the Firmware revision. (i.e.)
Company: Nuera Communications, Inc., ProductFamily: ORCA Series, P +roduct: RDT-8, SoftwareVersion: rdtg7.0.4.7, HardwareRevision: A should return: rdtg7.0.4.7 and Vertical Horizon VH-2402-L3 should return nothing

Replies are listed 'Best First'.
Re: Re: RegEx revision needed
by MCS (Monk) on Feb 23, 2004 at 16:23 UTC

    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.