Regular expression: - the function 'preg_match' answers: does a certain pattern occur INSIDE a certain string (not "does this string, in its entirety, match the pattern" -- use '^' and '$' in your regexp to check if the pattern matches the entire string) - when writing a regexp in a language: How do I express the regexp \w+\.\w+\.(edu|com) in Java? new Pattern("\\w+\\.\\w+\\.(edu|com)") in php? "/\\w+\\.\\w+\\.(edu|com)/" or '/\w+\.\w+\.(edu|com)/' - a regexp for "0, OR 3-or-more digits": (\d\d\d\d*)? - DTD which allows name, followed by images and histories (in either order), followed by a reference: