0

i have a TextFormField and want to use the validator. Only numbers from 0-255 should be allowed. Therefore I need to know how you write 0-255 in RegExp. !RegExp(XXX).hasMatch(value)) {... I have to paste it there, where XXX stands right now. I googled the redexp syntax for 0-255: /\b([01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5]) However flutter throws a lot of errors. What do i have to do?

Max

Max
  • 11
  • 2
  • Use the [numeric range regex generator](https://stackoverflow.com/a/67502416/3832970). See this [YT video](https://www.youtube.com/watch?v=nHwQp4clDZc) if you have trouble using it. – Wiktor Stribiżew Nov 12 '22 at 16:14

0 Answers0