I'm using a free text field in a Google Form. Users should be able to enter the name of a product followed by its price, then start a next line for the next product. To validate their entry I want to use regular expressions. Example entries:Coke .25 2.50Beer 0,33 3.30 Chai Latte Soy 4.50 ... and so onThese are the exact requirements for what a user can enter:a string containing digits, letters, and other punctuation such as commas, spaces, periods, dashes etc. This string should be no longer than 20 characters tops.a space (to separate the name of the product from its price)a price value, min. 0.0 and max. 9999.99. It is important that the decimal is separated by a . and not a ,a line break after each productThis is what I have:((\w|\s|\S){1,20}\s\d{1,4}\.\d{1,2}\s){1,50}It works OK for the first two lines, but when I try to enter a third line the script breaks. My browser asks me to stop or debug the script.What is wrong with the regular expression? Any pointers are appreciated!
Regular expression in Google Form crashes browser tab
google forms;regex