Regular Expression Google Forms

♀尐吖头ヾ 提交于 2019-12-24 16:34:07

问题


I have a scripp in a google spreadsheets which submits new forms and makes some calculations. Some people fill the number fields with things like ".00" instead of ",00". I have field validation in the form to only take whole numbers, but doesn't prevent this from happening. So 120.00 its not interpreted as 120 by google spreadsheets, it even cant parse it as a number.

I tried many workarounds with spreadsheets formulas with no luck but reading a bit i found the best way is to use a regular expression in the form validation.

I need a regular expression to prevent user from using "." and "," as i only want whole numbers.


回答1:


For a text field, do the following:

  1. Go to Advanced Settings -> Data validation -> Regular Expression
  2. Set to the condition to matches
  3. Add [0-9]+ regex to the text field on the right.



来源:https://stackoverflow.com/questions/32121994/regular-expression-google-forms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!