title: J string manipulation using only builtins
body: <p>You are given a string like <code>))()(())(</code>, and you wish to remove all instances of <code>()</code> from the string, which in this case means these two instances:</p>
  
  <pre><code>))()(())(
    ^^ ^^
  </code></pre>
  
  <p>leaving only <code>))()(</code>.  </p>
  
  <p>I know you can use the library function <a href="http://www.jsoftware.com/help/user/lib_strings.htm#stringreplace" rel="nofollow noreferrer">stringreplace</a>, or you could load up a regex library, but I want to know is if there is a concise way of accomplishing this the the J builtin operators exclusively?</p>
  
  <p>I should clarify that my own solution was:</p>
  
  <pre><code>#~(-.@+._1&amp;|.)@('()'&amp;E.) 
  </code></pre>
  
  <p>which I consider verbose -- so any similar solutions would not qualify as "concise" in my book.  I'm really asking if there is a way to use a builtin (or maybe a simple combination of 2) to solve this directly.  I expect this answer is no.</p>