Timeline for Check if names of a list are member of a list of names
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 3, 2021 at 22:35 | answer | added | kglr | timeline score: 0 | |
Sep 3, 2021 at 20:03 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Aug 4, 2021 at 19:54 | answer | added | Daniel Huber | timeline score: 1 | |
Aug 4, 2021 at 6:48 | comment | added | thorimur | also: do you have some broader task you want to do with this resulting list of parts? there may be an easier way to cross-check them in mathematica...! | |
Aug 4, 2021 at 6:43 | comment | added | thorimur |
and just to be clear, we have both MatchQ[names, {{___String}...}] and MatchQ[hypatia, {___String}] , right?
|
|
Aug 4, 2021 at 6:41 | comment | added | thorimur |
Consider poslist = Position[names, #] & /@ hypatia . This should give you a list of singletons, each containing the desired position specification; check that that's the case with MatchQ[poslist, {{{___}}...}] . If you get True , then you can safely take the first (and only) element of each: poslist = First /@ poslist But if you get False , let me know...
|
|
Aug 4, 2021 at 1:49 | comment | added | cvgmt | Please post a minimal working example. | |
Aug 4, 2021 at 0:58 | history | asked | prm | CC BY-SA 4.0 |