How to use * in string

int A = new[5];
A[0] = Normal1, A[1]= Normal2, A[2]= ORDERED2 ,A[3]= ORDERED1 ,A[4]= ORDERED0
foreach(A[i])
if(A[i] inside {“ORDERED1”, “ORDERED2”, “ORDERED0”})
B.push_back(i);

Here instead of using {“ORDERED1”, “ORDERED2”, “ORDERED0”}) I want to do some thing scalable like {ORDERED*} so that even if A[] assignemt changes to new values like ORDERED3 etc… I need not to change foreach looop
How to do this as {"ORDERED
"} is not possible as string doesnt use “*”

In reply to Santoshi N:

You have to clarify your use of strings versus names of variables. You declared A as a dynamic array of int.