|
Boost Users : |
Subject: [Boost-users] Question on data structure usage
From: Ram (sourceopen_at_[hidden])
Date: 2016-11-29 04:23:24
Hi,
I have a map as follows,
boost::unordered_map<string, string> sample_map;
I would like to look up the keys using wildcards/regex from the user and
get the values corresponding to it(get multiple matches). It looked like
there is no straightforward way to do it.
So, I was thinking as an when I populate the map, I create a seperate data
structure to store the keys, so that I can get the values(list) that match
my user inputted regex/wildcard search. The I use this list to get the
values from the map.
What data structure can I use for this purpose? Is my approach correct? Or
can I do this directly using the map?
Please help me solve this problem.
Thanks,
-R
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net