use a regular expression.
here is a regular expression that will restrict galley or Gallery as a singular word, but will allow "gallery123" or "saturdays gallery" to be entered:
/^((?!^((G|g)allery)$).)*$/
you could add Images and images to the restriction as well using:
/^((?!^((G|g)allery|(I|i)mages)$).)*$/