summaryrefslogtreecommitdiff
path: root/epan/ftypes
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2017-06-21 17:34:30 -0400
committerAnders Broman <a.broman58@gmail.com>2017-06-22 19:32:06 +0000
commit7d67af661a466dde4416c0583bbfa0250b14560f (patch)
tree47ed0deef89dab9b7becfdab74abb8aa9d680ce9 /epan/ftypes
parent07f576ffeb2bfabecaefbe24088a2858f47d4642 (diff)
downloadwireshark-7d67af661a466dde4416c0583bbfa0250b14560f.tar.gz
Make "matches" case-insensitive.
Make the "matches" operator case-insensitive by default. Case sensitivity can be switched back on using "(?-i)". It might be nice to make "contains" case-insensitive as well, but we'd need a caseless version of epan_memmem. Change-Id: I5e39a52c148477c30c808152bcace08348df815a Reviewed-on: https://code.wireshark.org/review/22330 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/ftypes')
-rw-r--r--epan/ftypes/ftype-pcre.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/ftypes/ftype-pcre.c b/epan/ftypes/ftype-pcre.c
index 5de0746bcd..05ad14a1ad 100644
--- a/epan/ftypes/ftype-pcre.c
+++ b/epan/ftypes/ftype-pcre.c
@@ -74,13 +74,13 @@ static gboolean
val_from_string(fvalue_t *fv, const char *pattern, gchar **err_msg)
{
GError *regex_error = NULL;
- GRegexCompileFlags cflags = G_REGEX_OPTIMIZE;
+ GRegexCompileFlags cflags = (GRegexCompileFlags)(G_REGEX_CASELESS | G_REGEX_OPTIMIZE);
/* Set RAW flag only if pattern requires matching raw byte
sequences. Otherwise, omit it so that GRegex treats its
input as UTF8-encoded string. */
if (raw_flag_needed(pattern)) {
- cflags = (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW);
+ cflags = (GRegexCompileFlags)(cflags | G_REGEX_RAW);
}
/* Free up the old value, if we have one */