title: If Field3 is contained in Field1 then Modify Field1 (Awk)
body: <p>I am trying to implement this logic with Awk: </p>
  
  <p>If $3 is in $1 then replace the “$3 part of $1 and 1 blank space” with “” (blanks).
  Print this new line and all other lines.</p>
  
  <p>e.g. In my output (below) “Paris” in field $3 is found in field $1.  So “Paris “ is replaced by “” in field $1.</p>
  
  <p>INPUT FILE</p>
  
  <pre><code>field1|field2|field3
  abc Paris Match|xxxx|Paris
  aaaaa|yyyyy|London
  </code></pre>
  
  <p>OUTPUT NEEDED</p>
  
  <pre><code>field1|field2|field3
  abc Match|xxxx|Paris
  aaaaa|yyyyy|London
  </code></pre>
  
  <p>CODE TRIED (Not working)</p>
  
  <pre><code>awk ' BEGIN{ FS=OFS="|"}
  {
     { if ( $1 ~ /$3/ )  { print $0 }  }
  } '
  </code></pre>