diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 9462761f3d3f..b025ebb3c441 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3769,7 +3769,7 @@ void Notepad_plus::maintainIndentation(wchar_t ch) _pEditView->execute(SCI_SETTARGETRANGE, startPos, endPos); // colon optionally followed by only whitespace and/or start-of-comment, but NOT on a line that is already a comment - const char colonExpr[] = "^[^#]*\\K:[ \t]*(#|$)"; + const char colonExpr[] = ":[ \t]*(#|$)"; auto posColon = _pEditView->execute(SCI_SEARCHINTARGET, strlen(colonExpr), reinterpret_cast(colonExpr));