0

The last question on challenge 1

I don't understand what it wants. Out asks for the age of all the wolves, there are many named wolves but alk have "wolf" in their name. When i put in wolf it says it is wrong. What am i missing here?

12th Sep 2016, 12:01 PM
Anne Roberts
Anne Roberts - avatar
1 Antwort
+ 1
'wolf' only matches 'wolf' exactly. You can use % to match any number of characters. They all have wolf at the end of their name, so you can use '%wolf'. If it was at the beginning, you would use 'wolf%'. If it was anywhere, you would use '%wolf%'. To match any character (but only one), use _. '_wolf' will match 'awolf' and 'bwolf' but not 'aawolf' for example. Of course, you can put more than one and combine them. '%wolf_a_b_c%abc' will match 'qwertywolfhalbpcasdfasdfabc' for example.
12th Sep 2016, 12:11 PM
Zen
Zen - avatar