RegEx in Sublime Text: Match any character, including newlines?

RegexSublimetext2

Regex Problem Overview


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.

Regex Solutions


Solution 1 - Regex

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJosephView Question on Stackoverflow
Solution 1 - RegexMRABView Answer on Stackoverflow