in reply to Regular expression
Then you can concentrate on any other checks that you want to do to make sure the number if valid. Note that in your expression to get the E number, your are using '.', which you need to escape if you want to match a decimal point, otherwise it will simply match any character. Try somethign like: \d\.\d*E[-+]\d\d (particular if this is coming from a fortran or c output code).my ( $id, $time, $date, $col1, $col2, $col3, $col4 ) = split / /, $line;
|
|---|