code: private void removeTables(StringBuilder article) {
          int tableStart = article.indexOf("{|");
          // Repeatedly loop while {| |} table markup still exists in the document
          while (tableStart >= 0) {
              // Find the matching closing |} if it exists.  Some wikipedia
              // text is malformated, with no matching table end. so take no
              // action in this case.
              int tableEnd = article.indexOf("|}", tableStart);
              if (tableEnd > tableStart) 
                  article.delete(tableStart, tableEnd + 2);
              else 
                  break;
              // Search for the next {| if it exists
              tableStart = article.indexOf("{|", tableStart);
          }
      }
docs: Remove wiki tables of the form "{| table |}".
  
  @param article The article text to clean.