```
awk '/^[+-]?[0-9]+\.?[0-9]*([Ee][+-]?[0-9]+)?$/ { next }
/^[+-]?\.[0-9]+([Ee][+-]?[0-9]+)?$/ { next }
{ print }' yourfile
```

The mantissa part of the number, can begin with a dot, or end with a dot, but cannot just be a dot: `.`

isn't valid, and adding an exponent like `.E3`

doesn't make it valid. `0.`

and `.0`

are valid, with or without an exponent. The exponent may be an upper or lower case `e`

, and may have an explicit `+`

sign.

Note that this assumes no whitespace around the floating-point values. It also matches integer values. Furthermore, it passes through items which differ from the floating-point notation with junk characters or whatever, like `1E+`

, `1.0A`

or `.0E+33x`

. Note that some of these examples have a floating-point notation as a valid *prefix*.

The two regular expressions can be combined to avoid repetition of the common exponent part, and the common rule action. The result is even less readable, though.

Lastly, `{ print }`

can be "code golfed" down to just `1`

. The expression `1`

is Boolean true, and awk's default action for a true condition or matching pattern is `{ print }`

.