From the course: Cucumber Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Update price attribute

Update price attribute

From the course: Cucumber Essential Training

Start my 1-month free trial

Update price attribute

- [Instructor] So in case of price, if I were to put quantifier here that mentioned four, that means, this is going to match any combination of digits from zero through nine exactly four times. So, one, two, three, four, zero, zero, zero, zero, nine, nine, nine, nine, or four, three, two, one, would match. If I change this to asterisk this would match zero or more digits. So, an empty string would also match. In our case, I'm just going to leave it as plus. So, we require this parameter and this captured group is defined by round brackets. So, it's going to match and bring to our method by match the value that is supplied for price. Let's go ahead and change this digits to \\d. What does this mean? This is essentially a shorthand character that represents zero through nine, or numeric digits. Actually, the \d matches numeric digits. We put an extra backslash as escape character because Java is not going to like this backslash character. Let's review the shorthand characters. \d means…

Contents