+ 6
This is because "?" metacharacter means zero or more repetions of pattern in brackets. In your code you say to whole "icecream" pattern can be repeat zero or one times. "sousage" match "icecream" zero times so pattern is matched.
25th Mar 2018, 11:07 PM
Vladi Petrov
Vladi Petrov - avatar