Question Mark (?)

Created by: LunaMetrics on February 20, 2008
Last updated by: LunaMetrics on 20 February 2008

The ? is used as follows:

? Match zero or one of the previous expression

"The previous expression" means the character that comes right before the question mark.

Let's say that you have an economics website and you only want to look at the referrers that have the word "labour" in their title. But some of those referrers come from countries where they spell it "labor". You could create a filter like this: labou?r

That way, it will match "labour" (which does have a "u", which is the previous expression) and labor (which has zero of the previous expression, i.e. no "u" is included.)

You cannot use it like this : labo?r, or at least, not for the same purpose. It's not a wildcard that you stick in between the o and the r to match any letter. The only matches would be to "labor" (zero of the previous expression) and "labr".