Pattern matching Multiple whitespaces between words https://regexr.com/8jlcq \b\s{2,}\b Exact match of two whitespaces after a string Example: after #' https://regexr.com/8jlct #'\s{2}(?!\s) Two consecutive lines with only this string: #' ^#'\r?\n^#'$