I'm assuming Java is the language...
You are on the right track. I might approach this a little differently.
Start with the only known part that MUST exist to create the what you are searching for. That is, the expression must start with digits.
\d+
\d means digits (the same as [0-9]) and the + is one or more times. Now, before we move forward... we have to consider that this is not all there is to it. For example, someone could have those digits embedded in text (type-o or modern slang). In that case we would not want to assume the digits are a decimal literal.
\b\d+\b
Here, we simple add \b (word boundary) which will mean that we will match the value 2 but not 2cool. We could approach this in other ways, but you would have to be more specific about the input you will be passing to the RegExp.
Next, we have to consider that everything else is optional. So... lets tackle the decimal with trailing digits.
\b\d+(?:\.\d+)?\b
What have we done here? In a RegEx (X) means we are concerned about whatever X is and we want to remember it. If we use (?:X) then we are saying we care about X but we do not want to remember the match. Also, we have to consider that the decimal and following digits may not be there... so we but the ? at the end of the group to indicate we want to match once or not at all. Finally, the decimal itself is a construct meaning "any character" so we have to escape it with a backslash.
Finally, we have the E +/- followed by one or more digits. This part only appears if we have the decimal. And, it may not even be there. So...
\b\d+(?:\.\d+(?:E\+|-\d+)?)?\b
Since the E +/- and following digits only appear if we have the decimal positions, we put another (?:X) grouping inside of the existing (?:X) grouping. This is a way of saying, we care about the E +/- stuff if the .xxx stuff is there. Our expression for this is E (literally the letter) followed by \+|- (plus or minus... and we escape the + since it has other meanings if we don't) \d+ (one or more digits). We end that grouping with a ? meaning it should show up once or not at all.
So the final expression is
\b
... word bundary
\d+
... one or more digits
(?:
... here comes a group of things, but don't remember it
\.\d+
... a decimal followed by one or more numbers
(?:
... here comes another group we don't care to remember
E\+|-\d+
... E and a + or - and then one or more digits
)?
... ok... that E +/- thing is there once or not at all
)?
... oh... and the decimal, number thing is there once or not at all
Regular Expressions are tough. No doubt. There are probably also a hundred other ways to do this so my answer may not be the most efficient.
NOTE --- I write this without actually testing it as I went... just going from memory. I may have missed something obvious or just plain done something stupid... do not take this advice without a grain of salt. Be sure to test and re-test each step of this expression as you build it. If I did screw up (quite possible) it will give you an excellent chance to explore and debug the expression. Use the source below for more info.