java - Find pure number from sentence, not alpnanumeric -


i'm struggling make regex find number (pure number e.g. 55) sentence, not alphanumeric(2nd)

e.g. in sentence "this 1st test, , got 66 marks" should found "66" not "1" in 1st.

i've tried regex (\d+), found 2 numbers "66" , "1" i need pure number not alpha numeric.

try checking word boundaries:

\b\d+\b 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -