\. # the character '.' swf # the string, 'swf' (?: ... ) # don't save this expression \? # the character '?' .* # zero or more characters (not a newline) ? # zero or one occurances (of the grouping in parens) $ # end of the line /oi # don't re-evaluate, case insensitive.