A little regex help please ...
Brian D. McGrew
brian at visionpro.com
Mon Jul 10 14:49:38 UTC 2006
Morning all,
I'm in a shell script (hey, it's dark in here) in the middle of a 'for f
in *' loop and I walking through a list of directories that looks like:
5.1
5.1.1
5.1.1-LINUX
5.1.1-FC3
5.1.1-RH73
5.1.1_debug
5.1.1_debug_O1G
5.1.2
5.1.2-LINUX
5.1.2-FC3
5.1.2-RH73
5.1.2_debug
5.1.2_debug_O1G
All of these start with a number. I'm looking for a simple regex to
pick off everything up to and including the last numerical value and
throw away everything after the last numerical value.
Regex has always been a mystery to me, any help would be great!
TIA,
:b!
Brian D. McGrew { brian at visionpro.com || brian at doubledimension.com }
--
> This is a test. This is only a test!
Had this been an actual emergency, you would have been
told to cancel this test and seek professional assistance!
More information about the fedora-list
mailing list