Here is what I want to do:
I have a list of strings for example
s={"red carpet","red box","black carpet","black box"}
I want to use something like
Select[s, StringMatchQ[#, "red"] &] (*to get an output*)
{"red carpet","red box"}
thx in advance for your help
Select[s, StringMatchQ[#, ___ ~~ "red" ~~ ___] &]
!! $\endgroup$StringMatchQ
documentation page? $\endgroup$Select[s, StringPosition[#, "red"] != {} &]
$\endgroup$