Task

Find all    <lang>    tags without a language specified in the text of a page.

Display counts by language section:

Description

<lang>Pseudocode</lang>

=={{header|C}}==
<lang C>printf("Hello world!\n");</lang>

=={{header|Perl}}==
<lang>print "Hello world!\n"</lang>

should display something like

2 bare language tags.

1 in perl
1 in no language



Extra credit

Allow multiple files to be read.   Summarize all results by language:

5 bare language tags.

2 in c ([[Foo]], [[Bar]])
1 in perl ([[Foo]])
2 in no language ([[Baz]])



Extra extra credit

Use the   Media Wiki API   to test actual RC tasks.




var [const] CURL=Import("zklCurl"),
   partURI="http://rosettacode.org/wiki?action=raw&title=%s",
   langRE=RegExp(0'!\s*==\s*{{\s*header\s*\|(.+)}}!),  // == {{ header | zkl }}
   emptyRE=RegExp(0'!<lang\s*>!);
 
fcn findEmptyTags(a,b,c,etc){  // -->[lang:(task,task...)]
   results:=Dictionary();
   foreach task in (vm.arglist){
      println("processing ",task);
      currentLang:="";
      page:=CURL().get(partURI.fmt(CURL.urlEncode(task)));
      foreach line in (page[0]){
	 if(langRE.search(line,True)){
	    lang:=langRE.matched[1].strip();
	    if(lang) currentLang=lang;
	 }
	 if(emptyRE.matches(line,True)) results.appendV(currentLang,task);
      }
   }
   results
}