From c2ef3f785b61be44dbf821535910706e80eb7542 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sat, 23 Mar 2013 10:56:56 -0700 Subject: [PATCH] Updating comments for the string-stripping regex --- cpp/ycm/IdentifierUtils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/ycm/IdentifierUtils.cpp b/cpp/ycm/IdentifierUtils.cpp index 3a196829..70b80d28 100644 --- a/cpp/ycm/IdentifierUtils.cpp +++ b/cpp/ycm/IdentifierUtils.cpp @@ -30,10 +30,12 @@ const char *COMMENT_AND_STRING_REGEX = "|" "/\\*.*?\\*/" // C-style comments, '/* ... */' "|" - // Anything inside single quotes, '...', but mind the escaped quote + // Anything inside single quotes, '...', but mind the escaped quote and the + // escaped slash (\\) "'(?:\\\\\\\\|\\\\'|.)*?'" "|" - // Anything inside double quotes, "...", but mind the escaped double quote + // Anything inside double quotes, "...", but mind the escaped double quote and + // the escaped slash (\\) "\"(?:\\\\\\\\|\\\\\"|.)*?\""; const char *IDENTIFIER_REGEX = "[_a-zA-Z]\\w*";