August 6th, 2012, 10:35 AM
Want to grab hostname out of filename?
I want to be able to parse out the HOSTNAME of this example below, any help would be appreciated I am learning regex as I go. It is for scripting no particular language:
August 6th, 2012, 11:18 AM
HOSTNAME is the only part that is between a period and a hyphen?
August 6th, 2012, 12:15 PM
Did not work it gave me this:
Here is the an actual filename: explorer.838a8dad.v210-2012.08.02.13.50
In this example I only want v210 which is the hostname but hostnames will vary
August 6th, 2012, 12:36 PM
Hmm, yes it would do that...
August 6th, 2012, 12:50 PM
Unfortunately is doesn't, I tested it via RegExRX on my Mac but this site also shows same thing: on regex planet
August 6th, 2012, 01:59 PM
...Where's the lookahead? Why isn't the lookahead in there?
I'm surprisingly off the ball today. Time for a lunch break.
Comments on this post
August 6th, 2012, 03:15 PM
Sweet that worked, thanks now I can continue what I was doing, So it was a look behind, not character in set one or more times, and look ahead. Thanks thats awesome!