in reply to RegEx revision needed

You know, it's very useful that beside the code and what you want it to output, you also print out what the code actually outputs. Now people have to download the code and run it to see what the differences are.

Having said that, your regular expressions match lines that "Version", possibly a colon, whitespace, the actual version number, and then something else (comma, or whitespace followed by "PROM"). But the lines that aren't matched but of which you want them to match do have the "Version" and version number, but not the required trailing stuff. For instance, in

Cisco Catalyst Operating System Software, Version 6.3(7)
There's no comma or 'PROM' that can be matched, so the entire regex fails. You need a more accurate description of your version numbers.

Abigail

Replies are listed 'Best First'.
Re: Re: RegEx revision needed
by Anonymous Monk on Oct 09, 2003 at 12:55 UTC
    Sorry, I should have included the ouput:
    # Output: $VAR1 = '12.2(15)T8'; $VAR2 = '2.2.0.1'; $VAR3 = '9.0.0.2'; $VAR4 = 'E5.8.0.3'; $VAR5 = '12.0(14)';