I am trying (\\d+|\\d+\\.\\d+) on this sample string:
(\\d+|\\d+\\.\\d+)
Oats 124 0.99 V 1.65
but it is giving me decimal number
Question not entirely clear, but the first problem I see is . is a magic character in regex meaning any character. You need to escape it with as . There are lots of regex cheat sheets out there, for example JavaScript Regex Cheatsheet
(\d+|\d+\.\d+)