Searching for multiple strings in a list
- To: mathgroup at smc.vnet.net
- Subject: [mg86280] Searching for multiple strings in a list
- From: "Coleman, Mark" <Mark.Coleman at LibertyMutual.com>
- Date: Fri, 7 Mar 2008 02:30:54 -0500 (EST)
Greetings, I'm doing some work with very long lists of strings. As part of the effort I need to identify strings that contain all of set of keywords (regardless of order) that a user may specify. The function StringCases will take multiple keywords as an argument, but it will return a list giving those elements that contain any one of the keywords, not *all* of the keywords. I know this can be done using multiple calls to StringCases and comparing the results for each keyword, but this seems very cumbersome, particularly if there are many keywords specified. Any help would be most appreciated. Thanks, -Mark
- Follow-Ups:
- Re: Searching for multiple strings in a list
- From: Oyvind Tafjord <tafjord@wolfram.com>
- Re: Searching for multiple strings in a list