Laddo wrote at Tue, 13 Aug 2002 06:31:24 +0200:
> i have a log file that i open to extract some information from file is
> like this
>
> var/backup/usersA2F.0.1_1027468994_24
> var/backup/usersA2F.0.2_1027468994_24
> var/backup/usersA2F.0.3_1027468994_24
> var/backup/usersA2F.0.4_1027468994_24
> var/backup/usersA2F.0.5_1027468994_24
> var/backup/usersA2F.0.6_1027468994_24
>
> i want a regular expression that can find only the third part i.e only
> usersA2F.0.1_1027468994_24
Don't you want to find the filename ?
If so,
use File::Basename;
> with awk i can do it easily like cat {thisfile} | awk -F'/'
> [{print $3 }'
>
> what is the equilent in perl ?
Of course, you can also use a regexp:
m:/(.*?)$/
Greetings,
Janek
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]