a ? means that the preceding character or group is optional - a ? is called a qualifier - so Sinhalese? mean that Sinhales and Sinhalese will match. however ???? means that the ? quantifiers are applying to each other - nested in other words, and that is not allowed in Perl's regex implementation