Re: Regex frustration...

2001-10-30 Thread John W. Krahn
Daniel Falkenberg wrote: > > Basically I have a file like the following... > > test1:x:26:testing1 > test2:x:45:testing2 > test3:x:45:testing3 > test4:x:23:testing4 > test5:x:45:testing5 > > Now I need to strip everything in there that is before the first ':' and > only match anything with the

Re: Regex frustration...

2001-10-24 Thread Brett W. McCoy
On Wed, 24 Oct 2001, Daniel Falkenberg wrote: > test1:x:26:testing1 > test2:x:45:testing2 > test3:x:45:testing3 > test4:x:23:testing4 > test5:x:45:testing5 > > Now I need to strip everything in there that is before the first ':' and > only match anything with the ':45'. I also need to be able to

Re: Regex frustration...

2001-10-24 Thread Martin Pfeffer
try to split the lines like: my ($var1, $var2,$var3,$var4) = split /:/, $line; # for every line of file than you can work with this as you like or you can split into array or in hash like this $hash{w1}{w2}{w3}{w4} = anything to control and than work with this hash Hope it helps Martin Daniel