I thought I was improving at expressions but this one has me stumped:

I have text interspersed with numbers.  The text can be anything, including
all types of punctuation marks.

Well let me give an example:  

The Text has numbers in it apparently-1.0 at random but 12 actually not...
$% ---- 12.3   0.9  .333  33 and -33.9000009  I need to extract
u&t(y2335.09u see

all the legiti5.33mate integers and floating point numbers and separate them
with CRs.  All text and nun-numeric data should be chucked.  it needs to
look for negative numbers but 2-1 and 4-66.7  are "2  1  4  66.7".   That is
- is a delimiter unless there's a space in front in which case the number is
negative.

The output for the text above should be:

-1.0    
12
12.3
0.9
.333
33
-33.9000009  
2335.09
5.33
2
1
4
66.7
2
1
2
66.7

Any help on the above would be GREATLY appreciated.  

Thanks,

Gregg R. Allen
EMC 2
Layered Product Engineering
62 TW Alexander Dr
Research Triangle Park, NC. 27709
Phone:  919.248.5859

Blessed are they who expect nothing, 
for they shall not be disappointed.

F. Nietzsche

Reply via email to