while ( <> ) { m{ name:[\w\.\-\s]+ , version:(?:\+|-)?\d*\.?\d* , date:\d{2}/\d{2}/\d{2} }x or print "Does not match on line $..\n"; }
You can check out perlre (or just perldoc perlre on must Unixy-type OSes) to find more information on what the different parts of that mean.
In reply to Re: string format validation
by mr_mischief
in thread string format validation
by gfarhat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |