Link to home
Start Free TrialLog in
Avatar of morsa801tons
morsa801tons

asked on

I need a regular expression

Hi!

i've got this line stored in a perl variable named $size:

4       /mail/lalalala.net/wbiz100332-m92

I want to keep only first number, this number can have from 1 to 4 digits (it's size in Kb)... what regular expressions can i use for this?

Thanks in advance!
Avatar of bira
bira

echo $size |cut -c1-4
ASKER CERTIFIED SOLUTION
Avatar of chris_calabrese
chris_calabrese

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial