Sometimes, when working with particularly ill-formed data (e.g., anything written free-form by people) you have to use a mixture of techniques to extract the data. For example, you can use both regexp and scan:
set inputString "wow yet 183.326ns another float"
if {[scan [regexp -inline {[\d.]+ns} $inputString] "%f" value] == 1} {
# Found something! It's in $value now
}
The regexp does the extraction (-inline is nice; it makes regexp return what it matched) and scan “extracts the sense” from what was found and stores a sane floating-point number in $value, assuming there was any there in the first place. You might need to tweak the RE to get best results (for example, the current one won't cope with negative numbers right now).