in reply to Trouble with regular expression
If you are absolutely, positively certain of the format of your input, then you can also try (assuming your input is in $_):
($year, $month, $day, $hour, $min, $sec) = m|\d{4})/(\d{2})/(\d{2}) (\ +d{2}):(\d{2}):(\d{2})|;
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trouble with regular expression
by northwestdev (Acolyte) on Jun 08, 2009 at 07:19 UTC | |
by CountZero (Bishop) on Jun 08, 2009 at 09:44 UTC | |
by ww (Archbishop) on Jun 08, 2009 at 10:58 UTC |