I need to parse a String having entry 5.55FIX, 5.55 Variable, 5.55Float. I need to extract the decimal value and the string as separate. please suggest?
Depending on where you're going to use the regex, one of this will surely do the job. Group 1 will contain the number, group 2 will contain the string. Of course this is assuming the string never begins with a number and without a whitespace between the actual number (in which case it couldn't even be told apart by a human unless he knows either the value of the number or that of the string in advance).
(\d+\.\d+)\W*(\w+)
(\d+\.\d+)\p{Z}*(\w+)
As suggested by Drew Noakes, if you only care about the decimal part you may also use one of these:
\d+(\.\d+)\W*(\w+)
\d+(\.\d+)\p{Z}*(\w+)
As suggested by David Andres, you can improve the expressions by adding ^ at the beginning and $ at the end if you're going to use the regex on strings made up only in the way you've stated in your post. This means that with those two characters, "5.55FIX" will match but "Value: 5.55FIX" will not.