I am trying to write a Dart CLI app. I want user to enter only lowered one word snack case like my_new_app_name
. What is the regex of this?
CodePudding user response:
Here is the solution:
final rgxp = RegExp(r'^[a-z_] $');
rgxp.hasMatch('my_new_app_name');