Fixed the regex compilation with GCC 13 sandbox/dkson95/regex accepted/tizen/unified/toolchain/20240509.023145
authorSlava Barinov <v.barinov@samsung.com>
Wed, 8 May 2024 11:34:16 +0000 (14:34 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Wed, 8 May 2024 11:48:01 +0000 (20:48 +0900)
We should explicitly show that \w is not a range start, or we get an exception:
"Invalid start of '[x-x]' range in regular expression" in run-time

Change-Id: I69be8f03b6430102325b33de9c949f99a75c007d

src/server/ContextPublisher.cpp

index 2fddfe45ee5b2666c9858cd3f3e941242b6182c2..e6015fa6ebd390bd5161fc104a81727990305dba 100644 (file)
@@ -23,7 +23,7 @@
 #include "ContextPublisher.h"
 #include "publisher/CustomPublisher.h"
 
-#define CUSTOM_URI_REGEX       R"~(^http:\/\/[\w-\.]+\/context\/custom\/[\w-\._\/]+$)~"
+#define CUSTOM_URI_REGEX       R"~(^http:\/\/[\w\-\.]+\/context\/custom\/[\w\-\._\/]+$)~"
 
 using namespace ctx;