title: how to extract the text between two words in notepad++
body: <p>I have to extract the text between <code>&lt;/con&gt;</code> and <code>&lt;con</code> in Notepad++ (i.e. delete the text except the one between these 2 words).</p>
  
  <p>My example data is like this:</p>
  
  <pre><code>&lt;abstract&gt;
  &lt;sentence&gt;The &lt;cons lex="CD4_coreceptor" sem="G#protein_molecule"&gt;CD4 coreceptor&lt;/cons&gt; interacts with &lt;cons lex="non-polymorphic_region" sem="G#protein_domain_or_region"&gt;non-polymorphic regions&lt;/cons&gt; of &lt;cons lex="major_histocompatibility_complex_class_II_molecule" sem="G#protein_family_or_group"&gt;major histocompatibility complex class II molecules&lt;/cons&gt; on &lt;cons lex="antigen-presenting_cell" sem="G#cell_type"&gt;antigen-presenting cells&lt;/cons&gt; and contributes to &lt;cons lex="T_cell_activation" sem="G#other_name"&gt;T cell activation&lt;/cons&gt;.&lt;/sentence&gt;
  &lt;sentence&gt;We have investigated the effect of &lt;cons lex="CD4_triggering" sem="G#other_name"&gt;&lt;cons lex="CD4" sem="G#protein_molecule"&gt;CD4&lt;/cons&gt; triggering&lt;/cons&gt; on &lt;cons lex="T_cell_activating_signal" sem="G#other_name"&gt;T cell activating signals&lt;/cons&gt; in a &lt;cons lex="lymphoma_model" sem="G#other_name"&gt;lymphoma model&lt;/cons&gt; using &lt;cons lex="monoclonal_antibody" sem="G#protein_family_or_group"&gt;monoclonal antibodies&lt;/cons&gt; (&lt;cons lex="mAb" sem="G#protein_domain_or_region"&gt;mAb&lt;/cons&gt;) which recognize different &lt;cons lex="CD4_epitope" sem="G#protein_family_or_group"&gt;CD4 epitopes&lt;/cons&gt;.&lt;/sentence&gt;
  &lt;sentence&gt;We demonstrate that &lt;cons lex="CD4_triggering" sem="G#other_name"&gt;&lt;cons lex="CD4" sem="G#protein_molecule"&gt;CD4&lt;/cons&gt; triggering&lt;/cons&gt; delivers signals capable of activating the &lt;cons lex="NF-AT_transcription_factor" sem="G#protein_molecule"&gt;NF-AT transcription factor&lt;/cons&gt; which is required for &lt;cons lex="interleukin-2_gene_expression" sem="G#other_name"&gt;&lt;cons lex="interleukin-2" sem="G#protein_molecule"&gt;interleukin-2&lt;/cons&gt; gene expression&lt;/cons&gt;.&lt;/sentence&gt;
  &lt;sentence&gt;Whereas different &lt;cons lex="anti-CD4_mAb" sem="G#protein_family_or_group"&gt;anti-CD4 mAb&lt;/cons&gt; or &lt;cons lex="HIV-1_gp120" sem="G#protein_molecule"&gt;&lt;cons lex="HIV-1" sem="G#virus"&gt;HIV-1&lt;/cons&gt; gp120&lt;/cons&gt; could all trigger activation of the &lt;cons lex="protein_tyrosine_kinase" sem="G#protein_family_or_group"&gt;protein tyrosine kinases&lt;/cons&gt; &lt;cons lex="p56lck" sem="G#protein_molecule"&gt;p56lck&lt;/cons&gt; and &lt;cons lex="p59fyn" sem="G#protein_molecule"&gt;p59fyn&lt;/cons&gt; and phosphorylation of the &lt;cons lex="Shc_adaptor_protein" sem="G#protein_molecule"&gt;Shc adaptor protein&lt;/cons&gt;, which mediates signals to &lt;cons lex="Ras" sem="G#protein_family_or_group"&gt;Ras&lt;/cons&gt;, they differed significantly in their ability to activate &lt;cons lex="NF-AT" sem="G#protein_molecule"&gt;NF-AT&lt;/cons&gt;.&lt;/sentence&gt;
  &lt;sentence&gt;Lack of full activation of &lt;cons lex="NF-AT" sem="G#protein_molecule"&gt;NF-AT&lt;/cons&gt; could be correlated to a dramatically reduced capacity to induce &lt;cons lex="calcium_flux" sem="G#other_name"&gt;&lt;cons lex="calcium" sem="G#atom"&gt;calcium&lt;/cons&gt; flux&lt;/cons&gt; and could be complemented with a &lt;cons lex="calcium_ionophore" sem="G#other_organic_compound"&gt;calcium ionophore&lt;/cons&gt;.&lt;/sentence&gt;
  &lt;sentence&gt;The results identify functionally distinct &lt;cons lex="epitope" sem="G#protein_family_or_group"&gt;epitopes&lt;/cons&gt; on the &lt;cons lex="CD4_coreceptor" sem="G#protein_molecule"&gt;CD4 coreceptor&lt;/cons&gt; involved in activation of the &lt;cons lex="Ras/protein_kinase_C_and_calcium_pathway" sem="G#other_name"&gt;&lt;cons lex="Ras/protein_kinase_C" sem="G#protein_molecule"&gt;&lt;cons lex="Ras/protein_kinase_C_pathway" sem="G#other_name"&gt;&lt;cons lex="Ras" sem="G#protein_molecule"&gt;Ras&lt;/cons&gt;&lt;cons lex="protein_kinase_C" sem="G#protein_molecule"&gt;/protein kinase C&lt;/cons&gt;&lt;/cons&gt;&lt;/cons&gt; and &lt;cons lex="calcium_pathway" sem="G#other_name"&gt;calcium pathways&lt;/cons&gt;&lt;/cons&gt;.&lt;/sentence&gt;
   &lt;/abstract&gt;
  </code></pre>
  
  <p>My desired out put is:</p>
  
  <pre><code>interacts with 
  of 
  on 
  and contributes to
  on 
  in 
  using 
  which recognize different 
  triggering
  delivers signals capable of activating the
  which is required for 
  or 
  could all trigger activation of the 
  and
  </code></pre>
  
  <p>I tried the regex <code>.*&lt;\/cons&gt;(.*?)&lt;cons.*</code> and replace with <code>$1</code> but that only gives me the data in the last occurrence of the <code>&lt;/con&gt;</code> and <code>&lt;con</code> of each <code>&lt;sentence&gt;</code> while my sentences contains more than one occurrence of these tags.</p>
  
  <p>Anyone who can help me??</p>