Add string support for buffer_pattern