How to pass a number up to one decimal number in a textInput?

I have a textInput in R shiny and in a condition, I want to pass only single number with a decimal up to one number only. like- 5.5, 6.1, 7.2
currently I am using-
if(round( grepl("^[3-9]+$", input$message ), 1)) but it is not working.

perhaps the regex pattern should be
"[1-9]+.[1-9]"


  1. 3-9 ↩︎

Hey, It worked. Thanks :smile: :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.