title: Check a string in array
body: <p>I am looking for how to check the string values in array values.</p>
  
  <p>My array <code>[array]$a01</code> contains values like below</p>
  
  <pre>
  WQA-JK-KUC-I01-hjkl-192.178.10.128/27
  WQA-JK-KUC-I01-hjkl-192.178.10.160/27
  WQA-JK-KUC-P02-hjkl-192.178.9.64/27
  WQA-JK-KUC-P02-hjkl-192.178.9.96/27
  WQA-JK-KUC-P01-NCI-hjkl-192.178.9.224/27
  WQA-JK-KUC-P01-NCI-hjkl-192.178.10.0/27
  WQA-JK-KUC-I01-EAD-194.270.24.0/24
  WQA-JK-KUC-I01-KAT-194.270.28.0/24
  WQA-JK-KUC-I01-ETKK-194.270.32.0/24
  WQA-JK-KUC-I01-hjkl-192.178.10.64/27
  WQA-JK-KUC-I01-hjkl-192.178.10.96/27
  WQA-JK-KUC-I01-hjkl-192.178.10.192/27
  WQA-JK-KUC-P01-NCI-hjkl-192.178.9.160/27
  WQA-JK-KUC-P01-NCI-hjkl-192.178.10.32/27
  WQA-JK-KUC-P01-NCI-hjkl-192.178.9.192/27
  WQA-JK-KUC-P01-NCI-EAD-199.198.168.0/23
  WQA-JK-KUC-P01-NCI-KAT-199.198.176.0/23
  WQA-JK-KUC-P01-NCI-ETKK-199.198.184.0/23
  WQA-JK-KUC-P01-NCI-EAD-199.198.170.0/23
  WQA-JK-KUC-P01-NCI-KAT-199.198.178.0/23
  WQA-JK-KUC-P01-NCI-ETKK-199.198.186.0/23
  WQA-JK-KUC-P01-KAT-194.270.168.0_23
  </pre>
  
  <p>and I have two variables</p>
  
  <pre><code>$v01 = 'abc-ekc-20-ghjkl-79-cis-4321-WQA-JK-KUC-P01-KAT-194.270.168.0_23'
  $v02 = 'abc-ekc-20-ghjkl-79-cis-4321-WQA-JK-KUC-P01-NCI-hjkl-192.178.9.160/27'
  </code></pre>
  
  <p>I write the code </p>
  
  <pre><code>if (($v01 -in $a01) -and ($v02 -in $a01)) {
      Write-Host "It is part of the array"
  } else {
      "Not in array"
  }
  </code></pre>
  
  <p>Output is: "Not in array".</p>