99

Is there a way to match any character in Sublime Text, including newlines? I saw that Sublime uses Boost's syntax but that the . character won't match newlines without a specific flag set.

Joseph
  • 12,678
  • 19
  • 76
  • 115
  • 2
    I think it's more correct to quote the documentation... Sublime Text uses the Perl Compatible Regular Expressions (PCRE) engine from the Boost library. http://sublime-text-unofficial-documentation.readthedocs.org/en/latest/search_and_replace/search_and_replace_overview.html – JJS Sep 10 '15 at 17:48

1 Answers1

168

Try adding the (?s) inline flag start the start of the pattern. That will make . match any character.

MRAB
  • 20,356
  • 6
  • 40
  • 33