Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have thousands of lines I'm parsing (all different). Any suggestions?expression: (?<!hw\_)(?=\s*Rev\.?(?:ision)?:?\s*([^\s;,\n\r]+)) returns: 'ersion' from: Company: Nuera Communications, Inc., ProductFamily: ORCA Series, P +roduct: RDT-8, SoftwareVersion: rdtg7.0.4.7, HardwareRevision: A expression: (?:s\/w)?Ver:?\s*([^\s;,\n\r>]+) returns: 'tical ' from: Vertical Horizon VH-2402-L3 # I need to ignore the string if it contains 'Vertical' # I tried (?<!Vertical)(?:s\/w)?Ver:?\s*([^\s;,\n\r>]+) # but it still returns tical, and I've tried setting the # space to one or more but that breaks other comparisons so # I can't do that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RegEx revision needed
by matija (Priest) on Feb 23, 2004 at 14:37 UTC | |
|
Re: RegEx revision needed
by ysth (Canon) on Feb 23, 2004 at 18:40 UTC | |
|
Re: RegEx revision needed
by ambrus (Abbot) on Feb 23, 2004 at 14:34 UTC | |
by Anonymous Monk on Feb 23, 2004 at 14:43 UTC | |
|
Re: RegEx revision needed
by Anonymous Monk on Feb 23, 2004 at 14:16 UTC | |
by MCS (Monk) on Feb 23, 2004 at 16:23 UTC | |
|
Re: RegEx revision needed
by TomDLux (Vicar) on Feb 25, 2004 at 04:55 UTC |