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
Post a Comment