title: Stata: code binary variable conditional on key words in string variable
body: <p>Is there any way to code a binary variable dependent on keywords being present in a given string variable? Simple example:</p>
  
  <p>I have a string variable that describes various meals and a dummy variable that denotes if a given meal is breakfast or not. Is there any way to code </p>
  
  <p>breakfast = 1 if meal== [then something saying contains eggs, bacon, etc.]</p>
  
  <p>This is a silly example, but I am more interested in identifying a shortcut to coding binary variables, based on information found in string data.</p>