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