Strings and patterns