title: How to use alternation with lookbehind
body: <p><strong><em>Aim:</em></strong> </p>
  
  <p>I would like to match sentences with the word 'no' but only if 'no' is not preceeded by 'with' or 'there is' or 'there are' in r. </p>
  
  <p><strong><em>Input:</em></strong></p>
  
  <pre><code>The ground was rocky with no cracks in it
  No diggedy, no doubt
  Understandably, there is no way an elephant can be green
  </code></pre>
  
  <p><strong><em>Expected output:</em></strong></p>
  
  <pre><code>The ground was rocky with no cracks in it
  Understandably, there is no way an elephant can be green
  </code></pre>
  
  <p><strong><em>Attempt:</em></strong></p>
  
  <pre><code>gsub(".*(?:((?&lt;!with )|(?&lt;!there is )|(?&lt;!there are ))\\bno\\b(?![?:A-Za-z])|([?:]\\s*N?![A-Za-z])).*\\R*", "", input_string, perl=TRUE, ignore.case=TRUE)
  </code></pre>
  
  <p><strong><em>Problem:</em></strong> </p>
  
  <p>The negative lookbehind seems to be ignored so that all the sentences are replaced. Is the problem the use of alternation in a the lookbehind statement?</p>