title: Finding macro variables in c files using java
body: <p>I am trying parse a c file and find all the variables that begin with "Apple_". I read the entire c file to a string and then use a regex to get all the variables. But I have a macro defined as:</p>
  
  <p><code>#define IAMMACRO(var,ext) var##ext</code></p>
  
  <p>so if I have </p>
  
  <pre><code>IAMAMACRO(Apple_,Variable)
  </code></pre>
  
  <p>I need to get the value Apple_Variable after the parsing and not Apple_. </p>
  
  <p>PS: I prefer an easy solution.</p>