Best regex for this, getting software version numbers

2007-10-25 Thread Andy Matthews
I have these strings: Firefox 2.0.0.8 (Firefox 2.0) Internet Explorer 7.0 (Internet Explorer 7.0) Googlebot 2.1 (Googlebot 2.1) Yahoo! Slurp (Yahoo! Slurp) etc. I'd like to grab everything up to a second period (if it exists). What I want is in parens next to each string. Anyone have

Re: Best regex for this, getting software version numbers

2007-10-25 Thread Ben Doom
Without testingL ^.*?($|\d+\.\d+) Which is, basically, beginning of string, shortest possible string, (end of string or digits dot digits). --Ben Doom Andy Matthews wrote: I have these strings: Firefox 2.0.0.8 (Firefox 2.0) Internet Explorer 7.0 (Internet Explorer 7.0) Googlebot

RE: Best regex for this, getting software version numbers

2007-10-25 Thread Andy Matthews
I came up with this: ([a-zA-Z0-9 !]+).?([a-zA-Z0-9]+) Is there a better way to do this? -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Thursday, October 25, 2007 4:27 PM To: CF-Talk Subject: Best regex for this, getting software version numbers I have