text:
Leet to English Translation
Your challenge is to write a program to translate (English) leetspeak/lolspeak/txtspk into normal English. Your program should read from standard input and output to standard output, unless your language does not support these.
You may use a file containing a list of words in the English language, separated by new lines. It should be called W and will be located in the same directory as your program. (On GNU/Linux systems and possibly others, you can make W a link to /usr/share/dict/words) The list doesn't have to be all-lowercase, you can use it to determine whether words should have capitals.
This is based on a now-deleted question posted by Nikos M. which could be found here. This is not a duplicate as this original question was closed and did not receive any answers, because there was no winning criterion and the user was unwilling to put one in.
Scoring
The scoring is a bit complicated!
Your score is
(leet items + bonuses) * 10 / (code length)

Highest score wins.
Your program doesn't have to be and probably can't be perfect, but the more accurate it is, the more bonuses it gets!
Since $ can mean both s and S, you get a bonus of 5 points per leet item for deciding whether it should have a capital letter (i.e. capital letters at the start of sentences).
You get a further bonus of 5 points per leet item for implementing proper nouns (words which always have capitals) - the way this works is that you would look through the word list, make the output capitalised if only a capitalised version is present in the list, and if both versions are there, just guess.
If a character has two meanings (e.g. 1 can mean L or I), you get 20 points per leet item for only picking those translations of the item which make real English words - use the wordlist for this. If more than one translation of a leet item makes a real English word, you can arbitrarily pick one of the valid translations and still get the bonus.
List of Leet
These are the leet items which you may implement. You don't have to implement all of them, but the more you add, the more points you get.
You cannot ever score points by translating an item or character to itself. This rule overrides any mistakes I might have made in the list.
It's tempting to do a simple tr or s/.../.../g. The real challenge is to determine which of multiple meanings could and couldn't be correct, using the wordlist.
Leet Items (each of these adds 1 to leet items in the formula)

$      -> s,S
(      -> c,C
5      -> s,S
@      -> a,A
4      -> a,A
3      -> e,E
7      -> t,T
+      -> t,T
#      -> h,H
teh    -> the
'd     -> ed
pwnd   -> pwned
pwnt   -> pwned
k,K    -> OK
kk     -> OK
0[zero]-> o,O
y,Y    -> why
4      -> for
txt    -> text
dafuq  -> what the f**k
/\,^   -> a,A
\/     -> v,V
d00d   -> dude
n00b   -> newbie
\/\/   -> w,W
8      -> b,B
|_|    -> u,U
|-|    -> h,H
Я      -> r,R
j00    -> you
joo    -> you
vv,VV  -> w,W
tomoz  -> tomorrow
|<     -> k,K
[),|)  -> d,D
<3     -> love
><     -> x,X
10100111001       -> leet (binary representation of 1337)
2      -> to,too
ur,UR  -> your,you're (no need to correctly distinguish between the two)
u,U    -> you
8      -> -ate-,8
x,X    -> -ks-,-cks-
z,Z    -> s,S
1      -> i,I,l,L
!      -> i,I,!
c,C    -> see,C,sea
b,B    -> be,B,bee
[accented letter] -> [non-accented form] (score 1 per accented letter supported)
&,7    -> and,anned,ant (may be used in the middle of a word)

Harder "Leet": score 30 points for leet items each

!!!1!!1-> !!!!!!! (translate 1's in a sequence of !'s into !'s)
!!!one!-> !!!!!
!eleven-> !!!

Examples
These are examples of what a program which implements all the leet characters above, and some of the bonuses, might be able to do:
Example sentence: |-|3 15 $|_|(# @ n00b = He is such a newbie
Leet-based censorship: $#!+ = s**t
Extreme leet: \/\/ 1 |< 1 P 3 [) 1 A = Wikipedia
-xor suffix: H4X0R = hacker
More extreme leet: @1\/\/4Y5 p0$+ ur n3VV qu35710nz 1n teh $&80x = Always post your new questions in the sandbox
Example Scoring
Bash, 10 characters, 3 items, no bonuses:
tr 137 let

This scores ( 1 * 3 ) * 10 / 10 = 3.

Sorry I didn't catch this in the sandbox, but if you're multiplying the bonuses by 10 they are still worth a lot more than the words themselves. Is that your intention?

@m.buettner It's to combat simply using tr or s/.../.../g. Just translating things like that would make a boring challenge, so we need to reward better translations which use the wordlist

Would a long series of regexps be permissible? I would love to see if it were possible (albeit hard) to do this even in a context-aware way in mostly regexps. (Or maybe a sed script.)

When I say a sed script, I mean more than a simple s/.../.../g, but a file that is parsed and executed by sed itself. As terse as the language is, it might be a decent golfable language...

@impinball Regexes are absolutely fine, although I have no idea how you would open the wordlist and parse it with a regex language alone. sed scripts are also fine and could be very interesting, they could do very well on this due to the short substitution syntax, you might be able to read from the wordlist, either with GNU extensions or by using sed as part of a larger Bash program

I would use GNU extensions and prefix the program with #!/usr/bin/sed -f as the top line to be runnable as a normal program.

@impinball The shebang won't count towards the total score as even without it you can easily run the program with sed -f <FILENAME>. Options passed to the interpreter normally count towards the score but since -f just makes sed read the program from a file, it won't count TL;DR: Shebangs don't count towards code length; I think that sed or a combination of sed and Bash is the right tool for the job here. Maybe awk as well, although I don't know it? and of course GolfScript might turn up

I'm pretty sure that pwned itself isn't english yet :)

@orion It basically is

The first example above isn't parsed by the rules provided. There isn't a rule defining "(" as "c". Does it need to be added?

@professorfish can you please clarify the scoring. If these items were supported: "$(5@437+#" thats 9 leet items and also gain the capitalization bonus, does that work out as ((9 + 5) * 10 / len) or would it be ((9 + 45) * 10 / len)? You say above that the bonus is 5 per leet item so that would be 5 * 9 = 45 bonus points correct? Also, for the !!!11! bonus, is it 30 bonus points for each of the 3 cases or does it need all of "1", "one" and "eleven" together for the 30 bonus points?

@Ryan add 5 per item for the capitalisation, so ((9+45)*10/len). it's to penalise simple substitutions. as for the 30pt bonus, 30 points per case

Javascript (49 + 5635) * 10 / 2174 = 26.14
Online Demo:
"Real dictionary" option doesnt work on drop box but it will work if run in a real web server. Tested in visual studio development server and google chrome.
https://dl.dropboxusercontent.com/u/141246873/leettranslator/index.html
Score:
49 leet items = 49
Capitalization bonus = 5 * 49 = 245
dictionary lookup bonus = 20 * 49 = 980
exclamation bonus * 3 = 90 * 49 = 4410
(leet items + bonuses) * 10 / (code length)
(49 + 5635) * 10 / 2174 = 26.14
Code:
function IsInDict(e) { return W[e] } function translate(e) { words = e.split(" "); res = ""; for (var t in words) { ex = ""; function n(e, r, i) { var s = false; for (var o = 1; o <= e.length; o++) { var u = e.substring(0, o) === "!" || i; var a = et[e.substring(0, o)]; var f = e.substring(o); if (a) { s = true; if (f.length === 0) { if (u) { ex = r + a; words[t] = "" } } else n(f, r + a, u) } } if (i && !s && r) { ex = r; words[t] = e.split("").reverse().join("") } } n(words[t].split("").reverse().join(""), "", false); mes = []; function r(e, t) { for (var n = 1; n <= e.length; n++) { var i = tokens[e.substring(0, n)]; var s = e.substring(n); if (i) { mFound = true; if (s.length === 0) for (var o in i) { mes.push(t + i[o]) } else for (var o in i) r(s, t + i[o]) } } if (e.length > 1) r(e.substring(1), t + e.substring(0, 1)); else { mes.push(t + e) } } m = ""; if (words[t] !== "") { r(words[t].toLowerCase(), ""); if (mes.length === 1) m = mes[0]; else { sl = []; for (var i in mes) { if (IsInDict(mes[i].slice(-1) === "." ? mes[i].substring(0, mes[i].length - 1) : mes[i])) { sl.push(mes[i]) } } if (sl.length > 0) m = sl[0]; else m = mes[0] } if (res === "") { m = cap(m) } if (res.slice(-1) === ".") { m = cap(m) } } res += " " + m; if (ex !== "") res += ex } return res.trim() } function cap(e) { return e.charAt(0).toUpperCase() + e.slice(1) } tokens = { $: ["s"], "(": ["c"], 5: ["s"], "@": ["a"], 4: ["a", "for"], 3: ["e"], "+": ["t"], "#": ["h"], teh: ["the"], "'d": ["ed"], pwnd: ["pwned"], pwnt: ["pwned"], k: ["ok"], kk: ["ok"], 0: ["o"], y: ["why"], txt: ["text"], dafuq: ["what the f**k"], "/\\": ["a"], "^": ["a"], "\\/": ["v"], d00d: ["dude"], n00b: ["newbie"], "\\/\\/": ["w"], 8: ["b", "ate"], "|_|": ["u"], "|-|": ["h"], "Я": ["r"], j00: ["you"], joo: ["you"], vv: ["w"], tomoz: ["tomorrow"], "|<": ["k"], "[)": ["d"], "|)": ["d"], "<3": ["love"], "><": ["x"], 10100111001: ["leet"], 2: ["to", "too"], ur: ["your", "you're"], u: ["you"], x: ["ks", "cks"], z: ["s"], 1: ["i", "l"], "!": ["i"], c: ["see", "sea"], b: ["be", "bee"], "&": ["and", "anned", "ant"], 7: ["and", "anned", "ant", "t"] }; et = { eno: "!", nevele: "!!", 1: "!", "!": "!" }

Ungolfed:
            tokens={
            '$':['s'],'(':['c'],'5':['s'],'@':['a'],'4':['a','for'],'3':['e'],'+':['t'],'#':['h'],'teh':['the'],"'d":['ed'],'pwnd':['pwned'],
            'pwnt':['pwned'],'k':['ok'],'kk':['ok'],'0':['o'],'y':['why'],'txt':['text'],'dafuq':['what the f**k'],
            '/\\':['a'],'^':['a'],'\\/':['v'],'d00d':['dude'],'n00b':['newbie'],
            '\\/\\/':['w'],'8':['b','ate'],'|_|':['u'],'|-|':['h'],'Я':['r'],'j00':['you'],
            'joo':['you'],'vv':['w'],'tomoz':['tomorrow'],'|<':['k'],'[)':['d'],'|)':['d'],'<3':['love'],
            '><':['x'],'10100111001':['leet'],'2':['to','too'],'ur':["your","you're"],
            'u':['you'],'x':['ks','cks'],'z':['s'],'1':['i','l'],'!':['i'],'c':['see','sea'],
            'b':['be','bee'],'&':['and','anned','ant'],'7':['and','anned','ant','t']}
            var excTokens = {'eno':'!','nevele':'!!','1':'!','!':'!'}

            function IsInDict(word)
            {
                return (W[word]);
            }

            function translate(input) {
                var words = input.split(" ");
                var result = "";
                for (var i in words) {
                    var exclamations = "";
                    function parseExclamations(s, prev, exclamationFound) {
                        var matchFound = false;
                        for (var j = 1; j <= s.length; j++) {
                            var hasExclamation = (s.substring(0, j) === "!") || exclamationFound;
                            var currentToken = excTokens[s.substring(0, j)];
                            var remaining = s.substring(j);
                            if (currentToken) {
                                matchFound = true;
                                if (remaining.length === 0) {
                                    if (hasExclamation) {
                                        exclamations = prev + currentToken;
                                        words[i] = "";//word only had exclamations in it so dont parse the rest of it
                                    }
                                }
                                else
                                    parseExclamations(remaining, prev + currentToken, hasExclamation);
                            }
                        }
                        if (exclamationFound && !matchFound && prev) {
                            exclamations = prev;
                            words[i] = s.split("").reverse().join("");//reverse back again
                        }
                    }
                    var reverseWord = words[i].split("").reverse().join("");
                    parseExclamations(reverseWord, "", false);

                    var matches = []
                    function parse(s, prev) {
                        for (var j = 1; j <= s.length; j++) {
                            var currentTokenArray = tokens[s.substring(0, j)];
                            var remaining = s.substring(j);
                            if (currentTokenArray) {
                                matchFound = true;
                                if (remaining.length === 0)
                                    for (var k in currentTokenArray) {
                                        matches.push(prev + currentTokenArray[k]);
                                    }
                                else
                                    for (var k in currentTokenArray)
                                        parse(remaining, prev + currentTokenArray[k]);
                            }
                        }

                        if (s.length > 1)
                            parse(s.substring(1), prev + s.substring(0, 1));
                        else {
                            matches.push(prev + s);
                        }
                    }

                    var match = "";
                    if (words[i] !== "") {
                        parse(words[i].toLowerCase(), "");

                        //check the dictionary
                        if (matches.length === 1)
                            match = matches[0];
                        else {
                            var shortlist = [];
                            for (var j in matches) {
                                //check dictionary. allow for a full stop at the end of the word
                                var isInDict = IsInDict(matches[j].slice(-1) === "." ? matches[j].substring(0, matches[j].length - 1) : matches[j]);
                                if (isInDict) {
                                    shortlist.push(matches[j]);
                                }
                            }

                            if (shortlist.length > 0)
                                match = shortlist[0];
                            else
                                match = matches[0];
                        }
                        if (result === "") {
                            match = cap(match);
                        }
                        if (result.slice(-1) === ".") {
                            match = cap(match);
                        }
                    }
                    result += " " + match;

                    if (exclamations !== "")
                        result += exclamations;
                }

                return result.trim();
            }

            function cap(string) {
                return string.charAt(0).toUpperCase() + string.slice(1);
            }

Test results:

|-|3 15 $|_|(# @ n00b ====> He is such a newbie
@1//4Y5 p0$+ ur n3VV qu35710nz 1n teh $&80x ====> Always post your new questions in the sandbox
!!!1!!1 ====> !!!!!!!
!!!one! ====> !!!!!
!eleven ====> !!!
teh!!!1!!1 ====> The!!!!!!!
teh!!!one! ====> The!!!!!
teh!eleven ====> The!!!
teh !!!1!!1 ====> The !!!!!!!
qu35710nz!1! ====> Questions!!!
+357 +357. 735+ ====> Test test. Test
& 31!73 #4(KER$ WR0+3 83773R L!K3 +#!5 7#@N 2D@Y ====> And elite hackers wrote better like this than today

Notes:
The dictionary is a seperate javascript file with an object called W containing all of the words. This just contains the words I needed for running the relevant tests.

If you run that through the Closure Compiler it's only 1640 characters bringing your score to 34.

what does this file do? https://dl.dropboxusercontent.com/u/141246873/leettranslator/JavaScriptSpellCheck/include.js is it just to get a dictionary from the web? (i.e. can the program run using W.js if it is removed)

@professorfish thats an external js lib with a dictionary in it (words up to ten letters). Its only used if the 'real dictionary' option is selected on the demo. Its just for a demo with a better dictionary and not part of my official answer.

Haskell - Score 1.421421421 : (37 items + (21 bonuses (capitalization) * 5)) * 10 / (999 bytes)
This is my final answer.
import System.Environment
import Text.Parsec
import Text.Parsec.String
s=string
r=return
t=try
o=oneOf
(>|)=(<|>)
a p l u=b[p]l u
b (p:q) l u=e(foldl(>|)(s p)$map(s)q)l u
c p l u=e(o p)l u
d p q=t$s p>>r q
e p l u=t$do{p;r l}>|do{s". ";p;r$". "++u}
f p q=t$do{between(t$s" ")(t$s" ")(o p);r q}
g::Parser String
g=do{s<-many$c"$5""s""S">|c"@4^""a""A">|c"3""e""E">|c"7+""t""T">|c"#""h""H">|d"teh""the">|d"'d""ed">|d"pwnd""pwned">|d"pwnt""pwned">|c"kK""ok""OK">|d"kk""OK">|d"n00b""newbie">|f"yY""why">|d"4""for">|d"txt""text">|d"dafuq""what the f**k">|b["\\/\\/","vv","VV"]"w""W">|a"/\\""a""A">|d"d00d""dude">|c"0""o""O">|a"\\/""v""V">|c"8""b""B">|a"|_|""u""U">|a"|-|""h""H">|c"Я""r""R">|b["j00","joo"]"you""you">|d"tomoz""tomorrow">|a"|<""k""K">|b["[)","|)"]"d""D">|d"<3""love">|a"><""x""X">|c"1!""i""I">|d"10100111001""leet">|c"2""too""to">|d"ur""your">|d"UR""you're">|f"uU""you">|c"xX""ks""cks">|d"&""and">|do{c<-anyChar;return [c]};return$concat s}
main=getArgs>>=putStrLn.show.(parse g"").concat

Tests
When the program is compiled to a file named min-lt, you can write the following shell script
#!/bin/bash
./min-lt "|-|3 15 $|_|(# @ n00b"
./min-lt "\$#!+"
./min-lt "\/\/ 1 |< 1 P 3 [) 1 A"
./min-lt "H4X0R"
./min-lt "@1\/\/4Y5 p0$+ ur n3VV qu35710nz 1n teh $&80x"
./min-lt "+357 +357. 735+"

which will print this
Right "he is su(h a newbie"
Right "shit"
Right "w i k i P e d i A"
Right "HaksoR"
Right "aiwaYs post your new questionz in the sandboks"
Right "test test. Test"

by -ks- I meant ks in the middle of a word. I'll have a look at this as soon as I find a haskell compiler

Just install the haskell-platform package. Do you have an example for ks?

<insertnamehere> rocX or roX

I've tested it, it's working

Updated my answer with a score and better handling of word translation.

(leet items + bonuses) * 10 / (code length)

I don't see you implementing correct capitalization, the first character is always lowercase. And I just noticed that this scores lower than the example in OP's question (score of 3). Perhaps the scoring needs to be reformulated.

I understood that a capitalization bonus is given when a leet item is the first letter of a sentence, the first character after a ". ". See the last test with ". 735+". It's an extremely crude way of doing things, but much shorter than doing a semantic analysis of the input string...

Extended BrainFuck :  0.6757
{a[-])&d}{c(-(-}{d)$t(-}:r:i:t$t,(-$i+$r+)$i($t 6+(-$i 5--)+$i 3+(--&c-(--
(3-(5-&c&c&c-&c--5-((-&d)$r.&d|"A"&a|"B"&a|"T"&a|"S"&a|"A"&a|"E"&a|"TO"&a
|"L"&a|"O"&a|"T"&a|"C"&a|"AND"&a|"S"&a|"H"&a|"I"(-))$i(-)$r(-)$t,(-$i+$r+))

So this does 15 translations "$(5@437+#0821!&" , no bonuses and it has 222 bytes (uneccesary linefeeds not included). 15*10/222 = 0.6757
Usage:
%> beef ebf.bf < leet.ebf > leet.bf
%> echo '& 31337 #4(KER$ WR0+3 83773R L!K3 +#!5 7#@N 2D@Y' | beef  leet.bf
AND ELEET HACKERS WROTE BETTER LIKE THIS THAN TODAY
%>

EBF isn't really made for golfing but it's rle feature, macros and print string feature makes it somewhat easier to compress than BrainFuck. The end compiled BrainFuck binary looks like this:
>>,[-<+<+>>]<[>++++++[-<------>]+<+++[--[-[--[--[---[-----[-[-[-[-[-[--[-[--------[[-]
>[-]<<.>]>[->++++++++[-<++++++++>]<+.[-]]<]>[->++++++++[-<++++++++>]<++.[-]]<]>[->++++
+++++[-<+++++++++>]<+++.[-]]<]>[->+++++++++[-<+++++++++>]<++.[-]]<]>[->++++++++[-<++++
++++>]<+.[-]]<]>[->++++++++[-<+++++++++>]<---.[-]]<]>[->+++++++++[-<+++++++++>]<+++.--
---.[-]]<]>[->++++++++[-<+++++++++>]<++++.[-]]<]>[->+++++++++[-<+++++++++>]<--.[-]]<]>
[->+++++++++[-<+++++++++>]<+++.[-]]<]>[->++++++++[-<++++++++>]<+++.[-]]<]>[->++++++++[
-<++++++++>]<+.+++++++++++++.----------.[-]]<]>[->+++++++++[-<+++++++++>]<++.[-]]<]>[-
>++++++++[-<+++++++++>]<.[-]]<]>[->++++++++[-<+++++++++>]<+.[-]]<[-]<[-]>>,[-<+<+>>]<]

The compiled BF code seems to work fine, it looks pretty short for a BF program

@professorfish Using ~"OTLHEAND" I could made all chars once for 107 bytes object code instead of making them from 0 each time using 354, but my answer is optimized for EBF code size :)

Java : 1.236
import java.util.*;public class L{static H<String,String>c;static H<String,String>w;static{c=new H();c.p("1","i");c.p("!","i");c.p("$","s");c.p("5","s");c.p("@","a");c.p("4","a");c.p("3","e");c.p("7","t");c.p("+","t");c.p("#","h");c.p("'d","ed");c.p("0","o");c.p("zero","o");c.p("\\/\\/","w");c.p("/\\","a");c.p("\\/","v");c.p("|<","k");c.p("[)","d");c.p("8","b");c.p("|_|","u");c.p("|-|","h");c.p("Я","r");c.p("(","c");c.p("VV","w");c.p("&","and");c.p("2","to");w=new H();w.p("@","a");w.p("teh","the");w.p("pwnd","pwned");w.p("pwnt","pwned");w.p("k","ok");w.p("kk","ok");w.p("y","why");w.p("Y","why");w.p("4","for");w.p("txt","text");w.p("dafuq","what the f**k");w.p("d00d","dude");w.p("n00b","newbie");w.p("j00","you");w.p("joo","you");}public static void main(String[]a){System.out.println(new L().C(a));}String C(String[]o){String x=T(o);for(String d:o){if(w.containsKey(d))x=x.replace(d,w.get(d));else{String r=d;for(String y:c.keySet()){if(d.contains(y))r=r.replace(y,c.get(y));}x=x.replace(d,r);}}return x;}String T(String[]l){String s="";for(String w:l)s+=" "+w;return s;}}class H<T1,T2>extends LinkedHashMap<T1,T2>{T2 p(T1 k,T2 v){return super.put(k,v);}}

So it does the following transformations
+357 +357. 735+
test test. test
|-|3 15 $|_|(# @ n00b
he is such a newbie
$#!+
shit
\/\/ 1 |< 1 P 3 [) 1 A
w i k i P e d i A
@1\/\/4Y5 p0$+ ur n3VV qu35710nz 1n teh $&80x
aiwaYs post ur new questionz in the sandbox
& 31337 #4(KER$ WR0+3 83773R L!K3 +#!5 7#@N 2D@Y
and eieet hacKERs WRote betteR LiKe this thaN toDaY

The score calculation is tricky

(leet items + bonuses) * 10 / (code length)
code length = 1165 leet
leet items = 39 (unique)
bonus = 21 (do not know how to calculate so copied MomemtumMori) (Please advise)

((39 + (21*5)) * 10) / 1165 = 1.236
Un-Golfed code :
import java.util.*;

public class L {
    static H<String, String> c;
    static H<String, String> w;

    static {
        c = new H();
        c.p("1", "i");
        c.p("!", "i");
        c.p("$", "s");
        c.p("5", "s");
        c.p("@", "a");
        c.p("4", "a");
        c.p("3", "e");
        c.p("7", "t");
        c.p("+", "t");
        c.p("#", "h");
        c.p("'d", "ed");
        c.p("0", "o");
        c.p("zero", "o");
        c.p("\\/\\/", "w");
        c.p("/\\", "a");
        c.p("\\/", "v");
        c.p("|<", "k");
        c.p("[)", "d");
        c.p("8", "b");
        c.p("|_|", "u");
        c.p("|-|", "h");
        c.p("Я", "r");
        c.p("(", "c");
        c.p("VV", "w");
        c.p("&", "and");
        c.p("2", "to");
        w = new H();
        w.p("@", "a");
        w.p("teh", "the");
        w.p("pwnd", "pwned");
        w.p("pwnt", "pwned");
        w.p("k", "ok");
        w.p("kk", "ok");
        w.p("y", "why");
        w.p("Y", "why");
        w.p("4", "for");
        w.p("txt", "text");
        w.p("dafuq", "what the f**k");
        w.p("d00d", "dude");
        w.p("n00b", "newbie");
        w.p("j00", "you");
        w.p("joo", "you");
    }

    public static void main(String[] a) {
        System.out.println(new L().C(a));
    }

    String C(String[] o) {
        String x = T(o);
        for (String d : o) {
            if (w.containsKey(d)) x = x.replace(d, w.get(d));
            else {
                String r = d;
                for (String y : c.keySet()) {
                    if (d.contains(y)) r = r.replace(y, c.get(y));
                }
                x = x.replace(d, r);
            }
        }
        return x;
    }

    String T(String[] l) {
        String s = "";
        for (String w : l) s += " " + w;
        return s;
    }
}

class H<T1, T2> extends LinkedHashMap<T1, T2> {
    T2 p(T1 k, T2 v) {
        return super.put(k, v);
    }
}

Would you mind ungolfing it? :D

C# score 45*10/2556=0.176
Program can output almost all lower and upper case letters. Since I'm not using a english word list the first key found in the Dictionary is used. E.g \/\/ becomes vav.
If char is first letter of a word ToUpper is applied.
using System;
using System.Collections.Generic;
class L
{
Dictionary<string, string> D;
public L()
{
D = new Dictionary<string, string>();
M();
}
public void M()
{
D.Add("$", "s,S");
D.Add("(", "c,C");
D.Add("5", "s,S");
D.Add("@", "a,A");
D.Add("4", "a,A,for");
D.Add("3", "e,E");
D.Add("7", "t,T,and,anned,ant");
D.Add("+", "t,T");
D.Add("#", "h,H");
D.Add("teh", "the");
D.Add("'d", "ed");
D.Add("pwnd", "pwned");
D.Add("pwnt", "pwned");
D.Add("k", "OK");
D.Add("K", "OK");
D.Add("kk", "OK");
D.Add("0", "o,O");
D.Add("y", "why");
D.Add("Y", "why");
D.Add("txt", "text");
D.Add("dafuq", "what the f**k");
D.Add("\\/\\/", "w,W");
D.Add("/\\", "a,A");
D.Add("^", "a,A");
D.Add("\\/", "v,V");
D.Add("d00d", "dude");
D.Add("n00b", "newbie");
D.Add("8", "b,B,ate,8");
D.Add("|_|", "u,U");
D.Add("|-|", "h,H");
D.Add("j00", "you");
//Я      -> r,R
D.Add("joo", "you");
D.Add("vv", "w,W");
D.Add("VV", "w,W");
D.Add("tomoz", "tomorrow");
D.Add("|<", "k,K");
D.Add("[)", "d,D");
D.Add("|)", "d,D");
D.Add("<3", "love");
D.Add("><", "x,X");
D.Add("2", "to,too");
//10100111001       -> leet (binary representation of 1337)
D.Add("ur", "your,you're");
D.Add("UR", "your,you're");
D.Add("u", "you");
D.Add("U", "you");
D.Add("x", "ks,cks");
D.Add("X", "ks,cks");
D.Add("z", "s,S");
D.Add("Z", "s,S");
D.Add("1", "i,I,l,L");
D.Add("!", "i,I,!");
D.Add("c", "see,C,sea");
D.Add("C", "see,C,sea");
D.Add("b", "be,B,bee");
D.Add("B", "be,B,bee");
//[accented letter] -> [non-accented form] (score 1 per accented letter supported)
D.Add("&", "and,anned,ant");
}

int P(string K, out List<string> V)
{
V = new List<string>();
string v,comma=",";
if(D.TryGetValue(K,out v))
{
string[] vv = v.Split(comma.ToCharArray());
foreach(string s in vv)
{
V.Add(s);
}
}
return V.Count;
}

public string E(string X)
{
string e ="";
string S = " ",t,k="";
string[] W = X.Split(S.ToCharArray());
int n = 0,x=0,m=0;
List<string> V=new List<string>();
bool F = false;
foreach(string s in W)
{
n = s.Length;
F = false;
for (int i = 0; i < n; i++)
{
m = 0;
for (int j = 1; j < n - i+1; j++)
{
k = s.Substring(i, j);
x = P(k, out V);
if (x > 0)
{
t = V[0];
if (t.Length == 1 && i == 0)
t = t.ToUpper();
e += t;
m = t.Length;
F = true;
break;
}
}
if (m > 0) i += (m - 1);
}
e += S;
}
return e;
}
static void Main(string[] a)
{
string t = Console.ReadLine();
L x = new L();
t = x.E(t);
Console.WriteLine(t);
Console.ReadLine();
}
}

Here's my test output:
$ -> S
( -> C
5 -> S
@ -> A
4 -> A
3 -> E
7 -> T
+ -> T
# -> H
teh -> the
'd -> ed
pwnd -> pwned
pwnt -> pwned
k -> OK
K -> OK
0 -> O
y -> why
Y -> why
4 -> A
txt -> text
dafuq -> what the f**k
/\ -> A
^ -> A
\/ -> V
d00d -> dude
n00b -> newbie
\/\/ -> Vav
8 -> B
|_| -> U
|-| -> H
j00 -> you
joo -> you
vv -> W
VV -> W
tomoz -> tomorrow
|< -> K
[) -> D
|) -> D
<3 -> love
>< -> X
2 -> to
ur -> you
UR -> you
u -> you
U -> you
8 -> B
x -> ks
X -> ks
z -> S
Z -> S
1 -> I
! -> I
c -> see
C -> see
b -> be
B -> be


text:
Pi is still wrong
Pi is Wrong
A common method of computing pi is by throwing "darts" into a 1x1 box and seeing which land in the unit circle compared to the total thrown:
loop
   x = rand()
   y = rand()
   if(sqrt(x*x + y*y) <= 1) n++
   t++
pi = 4.0*(n/t)

Write a program that looks like it should correctly compute pi (using this or other common methods of computing pi) but computes tau (tau = 2*pi = 6.283185307179586...) instead. Your code must produce at least the first 6 decimal places: 6.283185
Winner is crowned June 6th (one week from today).

Why is the winner not crowned June 28th??

@corsiKa: I thought about it, but I'm totally going to forget to crown the winner a month from now :/

I'm not sure why a winner needs to be crowned in a popularity contest.

I don't get it. This like asking for a function that appears to return 1 but returns 2. Who are we fooling here?

@ja72 The reader of the code :)

Everyone knows that pau is the correct one. :P

I'm voting to close this question as off-topic because underhanded challenges are no longer on-topic on this site. http://meta.codegolf.stackexchange.com/a/8326/20469

JavaScript
alert(Math.atan2(0, -0) - Math.atan2(-0, -0) + Math.atan2(0, 0))

Help, I'm trapped in a universe factory, and I'm not sure what I'm doing. Math.atan2 is supposed to return pi with good values, right? Math.atan2(0, -0) returns pi, so if I subtract it, and add it, I should still have pi.

I think I'm just gonna go lie down and cry. Goddamnit, JavaScript.

explanation please? :)

Counterclockwise angle in radians between x axis and point (Y,X). Sign of the Y point determines if this is a positive or negative angle, and this becomes π - (-π)

0_o  >>> 0 === -0 ;true ;>>> Math.atan2(0, 0) ;0 ;>>> Math.atan2(0, -0) ;3.141592653589793

@JackM, that statement is always appropriate to say :) Though in this case, it is due to the IEEE standard, and many languages (not just JS) have the zero vs negative zero problem.

BASIC
(More specifically, Chipmunk Basic)
This uses an infinite series discovered by Nilakantha Somayaji in the 15th century:
' Calculate pi using the Nilakantha series:
'               4       4       4       4
'  pi  =  3 + ----- - ----- + ----- - ------ + ...
'             2x3x4   4x5x6   6x7x8   8x9x10
i = pi = 0
numerator = -4
while i<10000
  i = i + 2
  numerator = -numerator
  pi = pi + numerator / (i * (i+1) * (i+2))
wend
pi = pi + 3
print using "#.##########";pi

Output
6.2831853072

If you can't figure out what's going on, here are a couple of hints:

 In Chipmunk Basic, the variable pi is preset to the value of π when the program starts running.

and

 In BASIC, the equals sign is used both for assigning variables and for testing equality. So a = b = c is interpreted as a = (b==c).

Wait I don't get it, so i equals false? And then you add 2 to it? And it works???

@Dunno: Sure, the loops starts at i == false which is similar to i == 0. The point is that the initial value for the accumulator pi isn't 0…

@Bergi yeah I just can't wrap my head around the fact that false + 2 == 2 :D

@Dunno Dynamic typing etc.: false is implicitly converted to 0 when doing arithmetic. You also have the same apparent behaviour in C which lacks a bool type, and uses 0 and non-zero to represent false and true repsectively. Not that it's elegant, but hey, that's how it works.

C - The length of half a unit circle
One way to compute π is simply to measure the distance the point (1, 0) travels when rotating around the origin to (-1, 0) since it will be half the circumference of a unit circle (which is 2π).

However, no sin(x) or cos(x) is needed since this can be done by stepping all the way around the origin and adding the distance the point travels for each step. The smaller size for each step the more accurate π you will get.
Note: The stepping will end when y is below zero (which is just as it passes (-1, 0)).
#include <stdio.h>                          // for printf
#define length(y, x) ((x * x) + (y * y))
int main()
{
    double x, y;
    double pi, tau, step;
    // start at (2, 0) which actually calculates tau
    x  = 2;
    y  = 0;
    // the step needs to be very low for high accuracy
    step = 0.00000001;
    tau = 0;
    while (y >= 0)
    {   // the derivate of (x, y) is itself rotated 90 degrees
        double dx = -y;
        double dy = x;

        tau += length(dx, dy) * step; // add the distance for each step to tau
        // add the distance to the point (make a tiny rotation)
        x += dx * step;
        y += dy * step;
    }
    pi = tau / 2;   // divide tau with 2 to get pi

    /* ignore this line *\                      pi *= 2;    /* secret multiply ^-^ */

    // print the value of pi
    printf("Value of pi is %f", pi); getchar();
    return 0;
}

It gives the following output:
Value of pi is 6.283185

Seems legit… Definitely.

Your length macro is missing a sqrt.  Is that intended?  x and y are also swapped between the definition and call (with no effect)

@BenVoigt Shhh! Don't spoil the trick, but yes. sqrt was accidentally omitted so that the value of pi was printed as 6,28... Also +1 for noticing x and y which i didn't!

oh, now I see you're tracing not a unit circle, but one with radius 2.  Yup, that works great.

I must confess that before understanding how it works I wasted a couple of minutes by not ignoring that line...

@loreb that line adds a whole new level to the trick

This is beautiful! So much misdirection. Thanks for the (rot13) ybiryl erserfure ba ubj qvssreragvny rdhngvbaf jbex. >< ^^

C
(This ended up being longer than intended, but I'll post it anyways...)
In the 17th century, Wallis published an infinite series for Pi:

(See
New Wallis- and Catalan-Type Infinite Products for π, e, and √(2 + √2) for more information)
Now, in order to calculate Pi, we must first multiply by two to factor out the denominator:

My solution then calculates the infinite series for Pi/2 and two and then multiplies the two values together. Note that infinite products are incredibly slow to converge when calculating final values.
output:
pi: 6.283182

#include "stdio.h"
#include "stdint.h"

#define ITERATIONS 10000000
#define one 1

#define IEEE_MANTISSA_MASK 0xFFFFFFFFFFFFFULL

#define IEEE_EXPONENT_POSITION 52
#define IEEE_EXPONENT_BIAS 1023

// want to get an exact as possible result, so convert
// to integers and do custom 64-bit multiplication.
double multiply(double aa, double bb)
{
    // the input values will be between 1.0 and 2.0
    // so drop these to less than 1.0 so as not to deal
    // with the double exponents.
    aa /= 2;
    bb /= 2;

    // extract fractional part of double, ignoring exponent and sign
    uint64_t a = *(uint64_t*)&aa & IEEE_MANTISSA_MASK;
    uint64_t b = *(uint64_t*)&bb & IEEE_MANTISSA_MASK;

    uint64_t result = 0x0ULL;

    // multiplying two 64-bit numbers is a little tricky, this is done in two parts,
    // taking the upper 32 bits of each number and multiplying them, then
    // then doing the same for the lower 32 bits.
    uint64_t a_lsb = (a & 0xFFFFFFFFUL);
    uint64_t b_lsb = (b & 0xFFFFFFFFUL);

    uint64_t a_msb = ((a >> 32) & 0xFFFFFFFFUL);
    uint64_t b_msb = ((b >> 32) & 0xFFFFFFFFUL);

    uint64_t lsb_result = 0;
    uint64_t msb_result = 0;

    // very helpful link explaining how to multiply two integers
    // http://stackoverflow.com/questions/4456442/interview-multiplication-of-2-integers-using-bitwise-operators
    while(b_lsb != 0)
    {
        if (b_lsb & 01)
        {
            lsb_result = lsb_result + a_lsb;
        }
        a_lsb <<= 1;
        b_lsb >>= 1;
    }
    while(b_msb != 0)
    {
        if (b_msb & 01)
        {
            msb_result = msb_result + a_msb;
        }
        a_msb <<= 1;
        b_msb >>= 1;
    }

    // find the bit position of the most significant bit in the higher 32-bit product (msb_answer)
    uint64_t x2 = msb_result;
    int bit_pos = 0;
    while (x2 >>= 1)
    {
        bit_pos++;
    }

    // stuff bits from the upper 32-bit product into the result, starting at bit 51 (MSB of mantissa)
    int result_position = IEEE_EXPONENT_POSITION - 1;
    for(;result_position > 0 && bit_pos > 0; result_position--, bit_pos--)
    {
        result |= ((msb_result >> bit_pos) & 0x01) << result_position;
    }

    // find the bit position of the most significant bit in the lower 32-bit product (lsb_answer)
    x2 = lsb_result;
    bit_pos = 0;
    while (x2 >>= 1)
    {
        bit_pos++;
    }

    // stuff bits from the lowre 32-bit product into the result, starting at whatever position
    // left off at from above.
    for(;result_position > 0 && bit_pos > 0; result_position--, bit_pos--)
    {
        result |= ((lsb_result >> bit_pos) & 0x01) << result_position;
    }

    // create hex representation of the answer
    uint64_t r = (uint64_t)(/* exponent */ (uint64_t)IEEE_EXPONENT_BIAS << IEEE_EXPONENT_POSITION) |
            (uint64_t)( /* fraction */ (uint64_t)result & IEEE_MANTISSA_MASK);

    // stuff hex into double
    double d = *(double*)&r;

    // since the two input values were divided by two,
    // need to multiply by four to fix the result.
    d *= 4;

   return d;
}

int main()
{
    double pi_over_two = one;
    double two = one;

    double num = one + one;
    double dem = one;

    int i=0;

    i=ITERATIONS;
    while(i--)
    {
        // pi = 2 2 4 4 6 6 8 8 ...
        // 2    1 3 3 5 5 7 7 9
        pi_over_two *= num / dem;

        dem += one + one;

        pi_over_two *= num / dem;

        num += one + one;
    }

    num = one + one;
    dem = one;

    i=ITERATIONS;
    while(i--)
    {
        // 2 = 2 4 4 6   10 12 12 14
        //     1 3 5 7    9 11 13 15
        two *= num / dem;

        dem += one + one;
        num += one + one;

        two *= num / dem;

        dem += one + one;

        two *= num / dem;

        dem += one + one;
        num += one + one;

        two *= num / dem;

        dem += one + one;
        num += one + one + one + one;
    }

    printf("pi: %f\n", multiply(pi_over_two, two));

    return 0;
}

 The exponent in the double conversion can't actually be ignored. If that's the only change (leave the divide by 2's, the multiply by 4, the integer multiplication) everything surprisingly works.

Java - Nilakantha Series
The Nilakantha Series is given as:
pi = 3 + 4/(2*3*4) - 4/(4*5*6) + 4/(6*7*8) - 4/(8*9*10) ...

So for each term, the denominator is constructed by multiplying consecutive integers, with the start rising by 2 each term. Notice that you add/subtract alternating terms.
public class NilakanthaPi {
    public static void main(String[] args) {
        double pi = 0;
        // five hundred terms
        for(int t=1;t<500;t++){
            // each i is 2*term
            int i=t*2;
            double part = 4.0 / ((i*i*t)+(3*i*t)+(2*t));
            // flip sign for alternating terms
            if(t%2==0)
                pi -= part;
            else
                pi += part;
            // add 3 for first term
            if(t<=2)
                pi += 3;
        }
        System.out.println(pi);
    }
}

After five hundred terms, we get a reasonable estimation of pi:
6.283185311179568

C++: Madhava of Sangamagrama
This infinite series is now known as Madhava-Leibniz:

Start with the square root of 48 and multiply it by the result of the sum of (-3)-k/(2k + 1). Very straightforward and simple to implement:
long double findPi(int iterations)
{
    long double value = 0.0;

    for (int i = 0; i < iterations; i++) {
        value += powl(-3.0, -i) / (2 * i + 1);
    }

    return sqrtl(48.0) * value;
}

int main(int argc, char* argv[])
{
    std::cout << "my pi: " << std::setprecision(16) << findPi(1000) << std::endl;

    return 0;
}

Output:
my pi: 6.283185307179588

Python - An Alternative to Nilakantha series
This is another infinite series to calculate pi that is fairly easy to understand.

For this formula, take 6 and start alternating between adding and subtracting fractions with numerators of 2 and denominators that are the product of two consecutive integers and their sum. Each subsequent fraction begins its set of integers rising by 1. Carry this out even a few times and the results get fairly close to pi.
pi = 6
sign = 1
for t in range(1,500):
i = t+1
   part = 2.0 / (i*t*(i+t))
   pi = pi + sign * part
   sign = - sign # flip sign for alternating terms
print(pi)

which gives 6.283185.

#include "Math.h"
#include <iostream>
int main(){
    std::cout<<PI;
    return 0;
}

Math.h:
#include <Math.h>
#undef PI
#define PI 6.28

Output: 6.28
#include "Math.h" is not the same as #include , but just by looking at the main file, almost no one would think to check. Obvious perhaps, but a similar issue appeared in a project I was working on, and went undetected for a long time.

A clever solution nonetheless.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Missing Odd Numbers
A set of whole numbers (0-) will be given separated by a space. Some numbers will be missing between certain numbers in the set. Your job is to find the missing odd numbers between them.
Conditions

The input will be a one line string.
Your code must left out a variable for inserting the input case
string.
The output should be a string containing all the missing odd
numbers in the set of numbers given as input.
The numbers of the output must be separated by a comma - ,.
No extra characters should be included in the output.
If there are no odd numbers missing, the code should print out
null or a blank line.

Here are some sample inputs and outputs according to its order :
Input
4 6 8 10
5 15 18 21 26
2 15 6
1 20
1 3 5 7 9

Output
5,7,9
7,9,11,13,17,19,23,25
3,5,7,9,11,13
3,5,7,9,11,13,15,17,19
null

The winner will be decided by the Code length.
The calculation of code length won't include the variable that is left for the test case.

@ProgramFOX PHP codes won't be shorter. It's hard to make a short code in PHP that solves the problem. This question is to promote PHP coding. Since codegolf discourages questions of single languages, other language answers are being accepted. I made the PHP need, because other language codes can be shorter. But it's hard to make it in PHP.

Seems awfully unfair to state that you'll be awarding the win to PHP, even if it's longer than the shortest not-PHP solution.

Removed arbitrary language requirement; challenges here are generally language-agnostic unless a very good reason exists to limit or otherwise suppress other languages.

@KyleKanos OK, so can I make this problem only in PHP without getting the question closed ?

Again, why must your answer be in PHP? This is beginning to sound like a homework problem....

@KyleKanos No it's not. OK, every language it is

Why the required string case parameter? the input is only numbers

@Einacio To easily give the input numbers separated by the whitespace. No, the variable won't be counted for choosing the winner.

"Your code must left out a variable for inserting the input case string." — I don't understand what this means.

I infer from the test cases that the intention is that the order of the input numbers is irrelevant, and that the output numbers should be greater than the minimum of the input and less than the maximum of the input. If this is the intention, it would be helpful to make it explicit.

It's unclear from test case 3 whether the 6 is used or discarded as bad input.  Since the 6 is the only number that's out of order, it's kind of a game changer.

@James Even if the numbers in the set are out of order like 5 9 3, the code should find the missing odd numbers. The conditions never said that the numbers given will be in order.

Generally, Strict IO formats are discouraged. I see no reason why this challenge should require String input and the numbers separated by commas in the output. Some languages don't have the concept of Strings or variables, and a few automatically print a space after every number. These strict requirements detract from an otherwise pretty good challenge IMO.

GolfScript (20 chars)
~]$),\(),+-{1&},','*

Online demo
Dissection:
~]$   # Eval the string, wrap the resulting integers in an array, sort
),    # Extract the max and make an array A of 0 to max-1 inclusive
\(),  # Extract the min and make an array B of 0 to min inclusive
+-    # Combine B with the remaining numbers from the input and remove them from A
{1&}, # Filter A to odd numbers
','*  # Comma-separate

Ruby, 74
s="insert your numbers here" # this line not counted per the rules
n=s.split.map &:to_i
puts (n.min..n.max).select{|x|x%2==1&&!n.index(x)}*?,

Output is identical to examples in question except that it outputs a blank line for no numbers found.

The output must be a string (not array) of missing odd numbers separated by comma ,. No extra chars like [ are allowed.

@Subin Ok, fixed. (You can't really output anything that's not a string, though; I'm having trouble understanding what that rule means.)

Python, 82 chars
N=map(int,I.split())
R=','.join(`x`for x in range(min(N)|1,max(N),2)if x not in N)

Set I to your input string, R is the output string.

+1 for min(N)|1 finding first odd number in range

You can still improve the character count. As the question doesn't require the arguments to be in order you could do ','.join(\x`for x in set(range(min(N)|1,max(N),2))-set(N))`

Groovy, 92 79 72 chars
x=args; //Input does not count
x=x*.toInteger();print((x.min()..x.max()).minus(x).grep{it%2}.join(","))

C#, 205 characters: 222 (total count) - 17 (total length of variable)
namespace System.Linq{class A{static void Main(){var a="4 6 8 10";var b=a.Split(' ').Select(int.Parse);Console.WriteLine(String.Join<int>(",",Enumerable.Range(b.Min(),b.Max()-b.Min()).Where(x=>x%2==1&&!b.Contains(x))));}}}

Ungolfed code:
namespace System.Linq
{
    class A
    {
        static void Main()
        {
            var a = "4 6 8 10";
            var b = a.Split(' ').Select(int.Parse);
            Console.WriteLine(String.Join<int>(",", Enumerable.Range(b.Min(), b.Max() - b.Min()).Where(x => x % 2 == 1 && !b.Contains(x))));
        }
    }
}

How it works: first, it splits the input string and parses each number into an integer. Then, it creates a range from the minimum occuring integer to the maximum and it takes all odd integers which do not occur in the input string.

I wrote the C# solution to this and was about to post it until I realized we came up with the exact same solution....

PHP 106
<?
$a = '4 6 8 10';
$a=split(' ',$a);foreach(range(min($a),max($a))as$i)if($i%2&&!in_array($i,$a))$d[]=$i;echo join(',',$d);

i'm not sure about what to discount from the char count, so i just discounted the line with the declaration

If set of numbers that doesn't have missing odd numbers, the code produces a warning : https://eval.in/157049 which according to the conditions are not allowed.

that condition is new...

@Subin fixed the warnings

Nice. I made it more complicated than necessary, as usual. :)

ised, 23 characters (16 code + 7 flags)
This is what ised is best at!
ised --d, --l input.dat 'O[min$1max$1]\$1'

Not counting the name of the file (which could be replaced by - for standard input), this clocks in at 23 characters plus program name plus punctuation needed for spacing the command line arguments. The actual code is just O[min$1max$1]\$1.
Explanation: --d, sets the output delimiter. --l <file> signifies that the following code is applied to each line. $1 represents the current line. The min and max elements are used to initialize the sequence constructor []. O selects the odd numbers. \$1 is the set-wise without operator, which removes the already given numbers from the generated sequence.
Please clarify how the characters should be counted. Does the name ised of the command count or not?

Input is not sorted (look at the examples)

Got it. Fixed...

I think the standard scoring for this would be 23: 16 for the program and 7 for the flags --d, --l

PHP, 110 chars
$a=split(' ',$i);echo join(',',array_filter(array_diff(range(min($a),max($a)),$a),function($n){return$n&1;}));

More readable version:
$a = split(' ', $i);
echo join(',',
    array_filter(
        array_diff(
            range(min($a), max($a)),
            $a
        ),
        function($n) {
            return $n & 1;
        }
    )
);

This basically creates an array of all the numbers within the range and uses a bitwise $n & 1 to check if the number is even or odd.
Demo

You can save 2 characters by replacing min($a) with $a[0], as the first number has to be the smallest.

@MrLore Order of the input is not guaranteed.

@nderscore: Oh, I hadn't noticed that. Thanks for the heads-up!

Pyth, 20
JSrz7j\,-f%T2rhJeJJ

J is the list of integers, sorted. rhJeJ gives all of the possible integers between the min and max of the input. f%T2 filters out the even numbers. -_J filters out the original elements of J. j\, joins the resultant list on commas, and the string is automatically printed.

In the spirit of @Kevin Cruijssen's answer:
Vyxal, 7 bytes (flexible I/O)
₌htṡF'∷

₌ht      # push head and tail of input
   ṡ     # range(a, b + 1)
    F    # filter by elements not in input
     '∷  # filter by odds

Try it Online!
Vyxal, 15 bytes (exact I/O)
⌈vI:₌htṡF'∷;\,j

Same principles, but ⌈vI: takes input as a space separated list, and \,j formats the list to be comma separated.
Try it Online!

Javascript (E6) 100 110
Edit: join in output is unnecessary (stolen from nderscore but too obvious)
Edit2: see comments
Edit3: fixed bug, skip min if odd
Edit4: teamwork ... (loop for every number, then inside loop skip even ones)
t='13 15 20 2'; /* Not counted */
l=t.split(' ').sort((a,b)=>b-a);for(n=l.pop(o=[]);++n<l[0];)n%2&!l.some(x=>x==n)&&o.push(n);alert(o)

Our answers have ended up being the same, so I removed mine. You beat me by a few minutes haha.

-1 byte: move o=[] inside of pop()

Why do you have to skip the min value? You're already checking if the value isn't in l before adding it to your output array.

I check all the numbers using 'l', but I get the min with pop(), so it's not there anymore. The relation between min and initial n is 2-->3, 3-->5, 4-->5 and so on

Makes sense now. Bring it back to 100: l=t.split(' ').sort((a,b)=>b-a);for(n=l.pop(o=[]);++n<l[0];)n%2&!l.some(x=>x==n)&&o.push(n);alert(o)

GolfScript, 51 40 characters
' '/{~}/]$:a),\(,\;-{.2%\a?-1=&},{','}/;

Input should be on STDIN. Test online
If input on STDIN is not allowed, then changing it so it allows variables only adds 1 character.
Ungolfed code with explanation:
' '/ # split input string
{~}/ # convert all strings into integers
]$   # put integers into an array and sort it
:a   # put array into variable a
)    # take last element from array
,    # create an array from 0 to the integer obtained from previous command
\    # swap new array and first array, first array is now on top
(    # take first element from first array
,    # create an array from 0 to the integer obtained from previous command
\;   # swap newest array and first array, and remove first array
-    # remove elements from second array if they also occur in third (newest) array
{    # this block will be used to process elements in the array
  .   # duplicate current item twice
  2%   # obtain the remainder when dividing it by 2
  \    # swap remainder and one of the duplicates
  a?   # obtain the index of the current item in the first array which is stored in variable a
  -1=  # check if index is -1 (the item is not found)
  &  # returns 1 if it is a missing odd number
},   # filter contents of array, only keep missing odd numbers
{','}/;  # separate results with commas

array block , as filter is very useful here.

Next you'll be posting pages full of 1's and 0's. lol :) +1

Javascript (ES6) - 85
Edit: Undeleted, as I found a solution that's different enough from edc65's to justify it's own answer.
i='13 15 20 2' // input is not part of byte count
o=[];i.split(' ').sort((a,b)=>a-b).sort((a,b)=>{for(;++a<b;)a%2&&o.push(a)});alert(o)

Ungolfed / Commented:
o=[];               // array for output
i.split(' ').       // split input by spaces
  sort((a,b)=>a-b). // sort by numeric order
  sort((a,b)=>{     // abuse sort as a way to run a function on every pair of neighboring
                    // values the array in order
    for(;++a<b;)    // loop from a+1 to b-1
      if(a%2)       // if odd
        o.push(a)   // push to array
  });               // the sort function returns nothing, so the order of the array is
                    // unchanged and no pair is compared twice
alert(o)            // the array is cast to a string, which is comma separated by default

J - 42 char
}.;(',',":)&.>n-.~l#~2|l=.(<./n)}.i.1+>./n=:4 6 8 10

I exclude from the character count the =:4 6 8 10 portion, but I include the n because that's part of the rest of the code—assignments can have return values in J.
Explained by explosion:
}.;(',',":)&.>n-.~l#~2|l=.(<./n)}.i.1+>./n=:4 6 8 10  NB. missing odd numbers
                                         n=:4 6 8 10  NB. input assigned to n
                                      >./n            NB. maximum of n
                                  i.1+                NB. integers from 0 to max(n) incl.
                          (<./n)                      NB. minimum of n
                                }.                    NB. drop first min(n) values
                       l=.                            NB. assign this to l
                     2|                               NB. modulo 2: 0 for evens, 1 for odds
                  l#~                                 NB. keep the odd numbers from l
              n-.~                                    NB. discard numbers already in n
   (      )&.>                                        NB. for each number:
        ":                                            NB.   convert to string
    ',',                                              NB.   and prepend a comma
  ;                                                   NB. run together all results
}.                                                    NB. remove leading comma

Example usage:
   }.;(',',":)&.>n-.~l#~2|l=.(<./n)}.i.1+>./n=:4 6 8 10
5,7,9
   }.;(',',":)&.>n-.~l#~2|l=.(<./n)}.i.1+>./n=:5 15 18 21 26
7,9,11,13,17,19,23,25
   }.;(',',":)&.>n-.~l#~2|l=.(<./n)}.i.1+>./n=:2 15 6
3,5,7,9,11,13
   }.;(',',":)&.>n-.~l#~2|l=.(<./n)}.i.1+>./n=:1 20
3,5,7,9,11,13,15,17,19
   }.;(',',":)&.>n-.~l#~2|l=.(<./n)}.i.1+>./n=:1 3 5 7 9    NB. blank line

   # }.;(',',":)&.>n-.~l#~2|l=.(<./n)}.i.1+>./n=:1 3 5 7 9  NB. see? length is 0
0

PowerShell, 101 99 95 91 78 58 chars
$a=$args #input doesn't count
$a=$a|sort;($a[0]..$a[-1]|?{$_%2-and!($a-like$_)})-join','

It outputs the same results as the example, and new line if there are no odd numbers missing.
Ungolfed code:
#input doesn't count
$a=$args
# Sort input array
$a=$a | sort;
# Loop from numbers starting at first (min) and ending at last (max) elements of array
($a[0] .. $a[-1] | ?{
    # Ouptup if element is even and is not contained in original input array
    $_ % 2 -and !($a -like $_
# Print output elements joined by ","
})-join','

PHP, 118 chars
// $n='4 6 8 11 14';
$o=[];$a=explode(' ',$n);foreach(range(min($a),max($a))as$b)if($b%2!=0&&!in_array($b,$a))$o[]=$b;echo implode(',',$o);

Expanded...
// Empty array to hold the output
$o = [];

// Put each number in a zero indexed array
$a = explode(' ', $n);

// Iterate through each number between the smallest number and the largest number, inclusive
foreach(range(min($a), max($a)) as $b) {

    // If the number is not even and it's not one of the numbers in the input,
    // then add it to the output array
    if ($b % 2 != 0 && !in_array($b, $a)) {
        $o[] = $b;
    }
}

// Glue the numbers in the output array together with a comma
echo implode(',', $o);

Could you explain how this works exactly?

@Synthetica How's that?

Better. Much better. (It was showing up in my review cue as a low quality answer)

Java: 173
public class R{
    public static void main(String[]a){
        int i=0,p=0;
        for(String s:a){
            int j=new Integer(s);
            i=i==0?j:i;
            while(++i<j)
            if(i%2==1)
                System.out.print((p++==0?"":",")+i);
        }
    }
}

//Compressed:
public class R{public static void main(String[]a){
int i=0,p=0;for(String s:a){int j=new Integer(s);i=i==0?j:i;
while(++i<j)if(i%2==1)System.out.print((p++==0?"":",")+i);}}}

To run:
java R 5 15 18 21 26

Produces:
7,9,11,13,17,19,23,25

PowerShell - 59
This creates an array of integers bounded by the max and min values in the array of arguments and sends it through the pipeline. It then passes through the numbers that are odd and not in the array of arguments.
$x=$args|sort;($x[0]..$x[-1]|?{$_%2-and$_-notin$x})-join','

Haskell, 137 chars and almost no spaces
import Data.List
main=let n=(map read(words$s)::[Int])in putStr$intercalate","$map show$(filter(\x->x`mod`2==1)[minimum n..maximum n])\\n

I love how Haskell doesn't give one crap about spaces.
Put the string in a function s

Perl 6, 60 50 bytes (55 47 chars)
HT to JoKing for shrinking it down a substantial number of bytes (mainly via the odd number generation and rearranging to kill some parentheses)
{join ',',keys (.min..^.max X+|1)∖$_}o+«*.words

Try it online!
Original answer:
(+«*.words).&{(.min+|1,*+2…*>.max-2)∖$_}.keys.join(',')

Try it online!
Here's the explanation for it:
(+«*.words)                                             # numberize each word in input (*)
           .&{                         }                # pass them to an inline method to
                                    ∖                   #   find the set difference of
              (       ,*+2…        )                    #     all odd numbers from
               .min+|1                                  #       1st (bitwise OR 1) to
                           *>.max-2                     #       last (first odd > max-2)
                                     $_                 #     and the original number set
                                        .keys.join(',') # print final values (.keys is
                                                        #     needed for quirk with Set)

If the output were just spaces, could use .Strinstead of .keys.join(','), but directly using .join on Set grabs the internal Bool values.  I'm legitimately surprised there wasn't anything much smaller, but the input/output requirements really killed options

@JoKing bravo, I really need to get better about using o

05AB1E, 20 13 bytes
#DZÅÉsWL«K',ý

Matching the specs exactly.. Input as space-delimited string, output as comma-separated string, or a blank line if no odd integers are found.
Try it online or verify all test cases.
With flexible/reasonable I/O rules this would be 8 bytes:
ZÅÉsWL«K

Input as list, output [] if no odd integers are found.
Try it online or verify all test cases.
Explanation:
#               # Split the (implicit) input-string on spaces
 D              # Duplicate this list
  Z             # Get the maximum (without popping the list itself)
   ÅÉ           # Create a list of all positive odd integers in the range [1, max]
     s          # Swap so the input-list is at the top of the stack again
      W         # Get the minimum (without popping the list itself)
       L        # Create a list in the range [1, min]
        «       # Merge it with the input-list
         K      # Remove all values in this list from the odd list we created earlier
          ',ý  '# Join the result by ","
                # (and output the top of the stack implicitly as result)

Ruby, 73
a=$*.map &:to_i;$><<(a.min..a.max).select{|n|n%2>0&&!a.index(n)}.join(?,)

Perl, 88 76 74 68 63 60 chars
@x=@ARGV; # Input doesn't count
sort{$a<=>$b}$x;say join",",grep{$_%2&"@x"!~$_}$x[0]..$x[-1]

This can be tested on console as:
perl -E '@x=@ARGV;sort{$a<=>$b}$x;say join",",grep{$_%2&"@x"!~$_}$x[0]..$x[-1]' 1 20

It outputs the same results as the example, and new line if there are no odd numbers missing.

This is not correct. First with parameters 1 13 3 will not be printed (because it matches parameters). Second I don't know such sort in place idiom, at least it doesn't work for on my perl version.

R, 59 chars:
b=range(a<-scan());d=b[1]:b[2];cat(d[!d%in%a&d%%2],sep=",")

Expanded a little:
a=scan() #Takes serie of integers as input
b=range(a) #Takes min and max
d=b[1]:b[2] #Creates sequence from min to max
cat(d[!d%in%a & d%%2], #Keep only those that are not in input and are odd
    sep=",") #Print them comma-separated

Usage:
> b=range(a<-scan());d=b[1]:b[2];cat(d[!d%in%a&d%%2],sep=",")
1: 2 15 6
4:
Read 3 items
3,5,7,9,11,13
> b=range(a<-scan());d=b[1]:b[2];cat(d[!d%in%a&d%%2],sep=",")
1: 5 15 18 21 26
6:
Read 5 items
7,9,11,13,17,19,23,25
> b=range(a<-scan());d=b[1]:b[2];cat(d[!d%in%a&d%%2],sep=",")
1: 1 3 5 7 9
6:
Read 5 items
>

VB.net (154c)
Dim a = From w In i.Split(" "c) Select Int32.Parse(w)
Console.WriteLine(String.Join(",",(From n In Range(a.Min,a.Max-a.Min)
                                   Where n Mod 2 = 1).Except(a))

Haskell, 105 (168 with variable+comment)
This code splits the string into 'words', reads the words as integers, and takes all of the odd numbers in the list-difference between the range of the numbers (all integers between the smallest and the largest values) and the list of numbers itself. I then convert it to a string, remove the brackets from the conversion of a list to a string, and print the line.
import Data.List
s="1 4 9 12 8 20" -- not counted, in accordance with the rules
main=putStrLn$show[y|let x=(map read).words$s,y<-[minimum x..maximum x]\\x,odd y]\\"[]"

Burlesque, 41
ln{wdrie!r@{2.%}f[}]m{{Jrij',==$$}f[}m[uN

The bloated length is mostly due to mostly formatting the output.

TinyMUSH, 129
&_ me=ifelse(or(eq(words(%0),1),eq(strlen(setr(0,istrue(ldiff(lnum(lmin(%0),lmax(%0)),%0,),mod(##,2),,\\\,))),0)),%r,%q0)
\u(_,X)

Replace the "X" in the u() function with the list of whole numbers.  The output is just a carriage return when there is one list item or a lack of odds to output.  Otherwise, the code constructs a list of integers starting from the lowest to the highest in the input.  The code then uses ldiff() to remove from that new list anything that appeared in the input.  Then evens are filtered out with mod(), and the list gets "," as the new delimiter.

Perl 5 - 66
66 characters including 3 for command line options
#!perl -lpa
%F=@F=sort{$a<=>$b}@F,@F;$_=join',',grep$_&!$F{$_},"@F"..pop@F

Takes multiple lines of data on the standard input.

JavaScript 89
Five less characters and better typing thanks to WallyWest.
s='5 15 18 21 26' // not counted
s=s.split(" ");o="";for(i=0;j=+s[i++];)for(;++j<+s[i];)o+=0!=j%2?(o?",":"")+j:"";alert(o)

Originally 94 chars.
s='5 15 18 21 26' // not counted
s=s.split(' '),o='',i=0;while(j=s[i++])for(j*=1;++j<s[i]*1;)o+=j%2!=0?(o?',':'')+j:'';alert(o)

You could bring it down to 89 by changing the while loop to a for loop, as well as tidying up the logic and typing of j: s=s.split(" ");o="";for(i=0;j=+s[i++];)for(;++j<+s[i];)o+=0!=j%2?(o?",":"")+j:"";alert(o)

Haskell 104 96 Bytes
import Data.List
l=sort.map read.words
f k=putStr$show[x|x<-[l k!!0..last$l k]\\l k,odd x]\\"[]"

A 136 byte version using only predule
l=map read.words
c x=foldl1 x.l
f k=putStr$[z|z<-show[x|x<-[c min k..c max k],x`notElem`l k,odd x], z`notElem`"[]"]

Details
    --words              |Take a string and break into list (implicit application since f=words is the same as f x = words x)
    --map read           |Convert all the words to a number (the type is inferred at run time based on input)

    l=sort.map read.words

    --[l k!!0..last$l k] |Generate sequence of all numbers from lowest to highest,
    --\\l k              |Remove any numbers in list l
    --odd x              |Only return odd.
    --show               |Convert to a string
    --\\"[]"             |Remove the [] characters from the string
    --putSTr             |Finally, put the string to the terminal.

    f k=putStr$[z|z<-show[x|x<-[l k!!0..last$l k]\\l k,odd x]]\\"[]"

PHP, 71 bytes
<?=join(array_diff(range(min($a=explode(' ',$i))|1,max($a),2),$a),',');

Input as predefined variable $i, per spec.
Try it online!
Ungolfed / explanation:
// input is from predefined variable $i
$i = '4 6 8 10';

// split space-delimited string from input into array
$a = explode( ' ', $i );

// create an array of odd numbers starting with the lowest odd number from the input
// ex: [4, 6, 8, 10] => [5, 7, 9]
//     [3, 4, 6, 7]  => [3, 5, 7]
$o = range( min( $a ) | 1, max( $a ), 2 );

// remove any numbers in the input array from the array of odds
// ex: remove [3, 4, 6, 7] from [3, 5, 7] => [ 5 ]
$b = array_diff( $a, $o );

// output array as comma-delimited string
echo join( ',', $b );

Or 74 bytes with input from STDIN, 63 bytes with flexible I/O.

Wolfram Language (Mathematica), 89 bytes
Complement[Range[Min@#~Floor~2+1,Max@#,2],#]~StringRiffle~","&@*ToExpression@*StringSplit

Try it online!
This script is a Composition of three functions, acting from right to left on the input string:

StringSplit splits the input string into a list of substrings separated by whitespace.
ToExpression then converts this list of substrings into a list of numbers.
The actual work is done in the function
StringRiffle[Complement[Range[Floor[Min[#], 2] + 1, Max[#], 2], #], ","] &

Range[Floor[Min[#], 2] + 1, Max[#], 2] is the list of odd numbers spanning from the smallest to the largest in the supplied list of numbers.
With Complement we eliminate those odd numbers that are already present in the supplied list of numbers.
What is left is then recomposed into a comma-separated string with StringRiffle.

A more flexible I/O format would reduce this solution to 44 bytes.

Javascript
function a(e){e=e.split(" ");var t=[];for(i=1;i<e.length*2;i+=2){if(e.join(",").indexOf(i)>-1){}else{t.push(i)}}return t.join(",")}

Ungolfed
function missingOdd(str) {
    str = str.split(' ');
    var out = [];
    for (i=1; i < str.length * 2; i+=2) {
        if (str.join(',').indexOf(i) > -1) {}else{
            out.push(i);
        }
    }
    return out.join(',');
}

If I give the input 4 6 8 10, it outputs 3,5,7. It's wrong output since between 4 & 10, there is no 3.

authors: ยงยุทธ สิงห์คราม

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Regex that only matches itself
There are some pretty cool challenges out there involving regex (Self-matching regex, Regex validating regex)
This may well be impossible, but is there a regex that will ONLY match itself?
NOTE, delimiters must be included:
for example /thing/ must match /thing/ and not thing. The only match possible for your expression must be the expression itself. Many languages allow the implementation of a string in the place of a regular expression. For instance in Go
package main

import "fmt"
import "regexp"

func main() {

    var foo = regexp.MustCompile("bar")
    fmt.Println(foo.MatchString("foobar"))
}

but for the sake of the challenge, let the expression be delimited (starting symbol, expression, ending symbol ex: /fancypantpattern/ or @[^2048]@), if you want to argue quotes as your delimiter, so be it. I think given the apparent difficulty of this problem it won't make much of a difference.
To help you along:
Quick hack I put together for rubular.com (a webpage for ruby regex editing):
var test = document.getElementById("test")
,regex = document.getElementById("regex")
,delimiter="/"
,options = document.getElementById("options")
,delay = function(){test.value = delimiter + regex.value + delimiter + options.value}
,update = function(e){
    // without delay value = not updated value
    window.setTimeout(delay,0);
}
regex.onkeydown = update;
options.onkeydown = update;

Even though this is technically 'code golf' I will be very impressed if anyone can find an answer/ prove it is impossible.
Link is now fixed. Sorry to all
Winning answer thus far: jimmy23013 with 40 characters

Obviously any regular expression that only includes literals will work: //, /a/, /xyz/, etc. It might be good to require that the regex has to include a non-literal operation.

literals won't work because you're required to match the backslashes for example /aaa/ will match aaa but not /aaa/

@DylanMadisetti Do we have to use // delimiters, or can we choose other delimiters (PCRE supports pretty much any character, and in particular you can use matched parentheses/braces/brackets as delimiters).

@m.buettner I believe it's very hard (or impossible) even with arbitrary delimiters.

@JanDvorak so do I, but it may open some possibilities.

@m.buettner I'm open to said possibilities

Use whatever delimiter you want as long as it is valid regex

It's impossible.
You have to write an expression that matches a string of more characters then it contains because of the delimiters. Therefor, you have to use wildcards, which will always mach more than one string. So, an regex matching is possible, but will ever match other character strings too but not ONLY itself.

I think that this is quite nice mathematical/computational problem and the proof might be not easy...
Many important theorems started as just a simple question to play with, so maybe in 5 years there will be wikipedia article "Madisetti problem" ;)

Hmm I'm afraid this might be trivial. There's nothing that says a language couldn't implement a re.match(pattern, str) which returns true iff pattern matches the entire string, with no leftovers. Then the regex "a" would match only the string "a". Could you be more specific? (I figured this out by going back to the basics, realizing a representation of a regex is different from the regular language it defines, then wondering how I'd go about representing a regular language (which is that which can be recognized by a DFA), then coming to this conclusion).

added some comments, I guess the problem does fall apart from a programmatic standpoint given that some reg helpers will accept strings

Can I use Tcl? In tcl strings need not be quoted. Just like bash. So if I use tcl or grep I don't need to use any delimiters right?

@slebetman but then literals will work. Part of the challenge is forcing the delimeter s to match

Yes, exactly. In some languages (think grep in bash) the delimiter is essentially an empty string. So assuming that regexp requires delimiters is already wrong in the first place. Indeed, since grep is one of the earliest implementation of regexp the canonical definition of regexp don't have delimiters. The wrongest manifestation of this assumption is PHP which requires two delimiters: "/ and /"

Is it acceptable if the actual match doesn't cover the entire input? E.g. the regex (?=^abc$)a will match only the string abc, but the actual match will only be a. Would that be fine?

@MartinBüttner it should be a complete match since an incomplete match leaves room for various matches. In your example ["(?=abc)a","(?=abc)ab"]. However, if there was no other possible string than the regex used, I would consider it valid.

I'm not sure I understand. The only possible string matched by the regex (?=^abc$)a is abc and only a single match will be generated. Basically, if you passed the regex to something like JavaScript's test function (which only returns a boolean whether it matched or not), you couldn't distinguish (?=^abc$)a and ^abc$. They both accept exactly one string.

PCRE flavor, 261 289 210 184 127 109 71 53 51 44 40 bytes
Yes, it is possible!
<^<()(?R){2}>\z|\1\Q^<()(?R){2}>\z|\1\Q>

Try it here. (But / is shown to be the delimiter on Regex101.)
Please refrain from making unnecessary edits (updates) on the Regex101 page. If your edit doesn't actually involve improving, trying or testing this regex, you could fork it or create new ones from their homepage.
The version works more correctly on Regex101 (44 bytes):
/^\/()(?R){2}\/\z|\1\Q^\/()(?R){2}\/\z|\1\Q/

Try it here.
This is much simpler than the original version and works more like a traditional quine. It tries to define a string without using it, and use it in a different place. So it can be placed very close to one end of the regex, to reduce the number of characters needing more characters to define the matching pattern and repeated more times.
Explanations:

\Q^\/()(?R){2}\/\z|\1\Q matches the string ^\/()(?R){2}\/\z|\1\Q. This uses a quirk that \Q...\E doesn't have to be closed, and unescaped delimiters work in \Q. This made some previous versions work only on Regex101 and not locally. But fortunately the latest version worked, and I golfed off some more bytes using this.
\1 before the \Q matches the captured group 1. Because group 1 doesn't exist in this option, it can only match in recursive calls. In recursive calls it matches empty strings.
(?R){2} calls the whole regex recursively twice, which matches ^\/()(?R){2}\/\z|\1\Q for each time.
() does nothing but capture an empty string into group 1, which enables the other option in recursive calls.
^\/()(?R){2}\/\z matches (?R){2} with delimiters added, from the beginning to the end. The \/ before the recursive calls also made sure this option itself doesn't match in recursive calls, because it won't be at the beginning of the string.

51 bytes with closed \Q...\E:
/\QE\1|^\/(\\)Q(?R){2}z\/\E\1|^\/(\\)Q(?R){2}z\/\z/

Try it here.
Original version, 188 bytes
Thanks to Martin Büttner for golfing off about 100 bytes!
/^(?=.{173}\Q\2\)){2}.{11}$\E\/\z)((?=(.2.|))\2\/\2\^\2\(\2\?=\2\.\2\{173}\2\\Q\2\\2\2\\\2\)\2\)\2\{2}\2\.\2\{11}\2\$\2\\E\2\\\2\/\2\\z\2\)\2\(\2\(\2\?=\2\(\2\.2\2\.\2\|\2\)\2\)){2}.{11}$/

Try it here.
Or 210 bytes without \Q...\E:
/^(?=.{194}\\2\\.\)\{2}\.\{12}\$\/D$)((?=(.2.|))\2\/\2\^\2\(\2\?=\2\.\2\{194}\2\\\2\\2\2\\\2\\\2\.\2\\\2\)\2\\\2\{2}\2\\\2\.\2\\\2\{12}\2\\\2\$\2\\\2\/D\2\$\2\)\2\(\2\(\2\?=\2\(\2\.2\2\.\2\|\2\)\2\)){2}.{12}$/D

Try it here.
Expanded version:
/^(?=.{173}\Q\2\)){2}.{11}$\E\/\z)        # Match things near the end.
((?=(.2.|))                               # Capture an empty string or \2\ into group 2.
   \2\/\2\^\2\(\2\?=\2\.\2\{173}\2\\Q\2\\2\2\\\2\)\2\)\2\{2}\2\.
   \2\{11}\2\$\2\\E\2\\\2\/\2\\z\2\)      # 1st line escaped.
   \2\(\2\(\2\?=\2\(\2\.2\2\.\2\|\2\)\2\) # 2nd line escaped.
){2}
.{11}$/x

Extensions like (?= and \1 have made the so-called "regular" expressions no longer regular, which also makes quines possible. Backreference is not regular, but lookahead is.
Explanation:

I use \2\ in place of \ to escape special characters. If \2 matches the empty string, \2\x (where x is a special character) matches the x itself. If \2 matches \2\, \2\x matches the escaped one. \2 in the two matches of group 1 can be different in regex. In the first time \2 should match the empty string, and the second time \2\.
\Q\2\)){2}.{11}$\E\/\z (line 1) matches 15 characters from the end. And .{11}$ (line 7) matches 11 characters from the end (or before a trailing newline). So the pattern just before the second pattern must match the first 4 or 3 characters in the first pattern, so \2\.\2\|\2\)\2\) must match ...\2\) or ...\2\. There cannot be a trailing newline because the last character should be ). And the matched text doesn't contain another ) before the rightmost one, so all other characters must be in the \2. \2 is defined as (.2.|), so it can only be \2\.
The first line makes the whole expression matches exactly 188 characters since everything has a fixed length. The two times of group 1 matches 45*2 characters plus 29 times \2. And things after group 1 matches 11 characters. So the total length of the two times \2 must be exactly 3 characters. Knowing \2 for the second time is 3 characters long, it must be empty for the first time.
Everything except the lookahead and \2 are literals in group 1. With the two times \2 known, and the last few characters known from the first line, this regex matches exactly one string.
Martin Büttner comes up with the idea of using lookahead to capture group 2 and make it overlap with the quine part. This removed the characters not escaped in the normal way between the two times of group 1, and help avoided the pattern to match them in my original version, and simplified the regex a lot.

Regex without recursions or backreferences, 85 bytes
Someone may argue that expressions with recursions or backreferences are not real "regular" expressions. But expressions with only lookahead can still only match regular languages, although they may be much longer if expressed by traditional regular expressions.
/(?=.*(\QE\\){2}z\/\z)^\/\(\?\=\.\*\(\\Q.{76}\E\\){2}z\/\z)^\/\(\?\=\.\*\(\\Q.{76}\z/

Try it here.
610 bytes without \Q...\E (to be golfed):
/^(?=.{610}$)(?=.{71}(\(\.\{8\}\)\?\\.[^(]*){57}\)\{2\}\.\{12\}\$\/D$)((.{8})?\/(.{8})?\^(.{8})?\((.{8})?\?=(.{8})?\.(.{8})?\{610(.{8})?\}(.{8})?\$(.{8})?\)(.{8})?\((.{8})?\?=(.{8})?\.(.{8})?\{71(.{8})?\}(.{8})?\((.{8})?\\(.{8})?\((.{8})?\\(.{8})?\.(.{8})?\\(.{8})?\{8(.{8})?\\(.{8})?\}(.{8})?\\(.{8})?\)(.{8})?\\(.{8})?\?(.{8})?\\(.{8})?\\(.{8})?\.(.{8})?\[(.{8})?\^(.{8})?\((.{8})?\](.{8})?\*(.{8})?\)(.{8})?\{57(.{8})?\}(.{8})?\\(.{8})?\)(.{8})?\\(.{8})?\{2(.{8})?\\(.{8})?\}(.{8})?\\(.{8})?\.(.{8})?\\(.{8})?\{12(.{8})?\\(.{8})?\}(.{8})?\\(.{8})?\$(.{8})?\\(.{8})?\/D(.{8})?\$(.{8})?\)(.{8})?\(){2}.{12}$/D

Try it here.
The idea is similar.
/^(?=.{610}$)(?=.{71}(\(\.\{8\}\)\?\\.[^(]*){57}\)\{2\}\.\{12\}\$\/D$)
((.{8})?\/(.{8})?\^(.{8})?\((.{8})?\?=(.{8})?\.(.{8})?\{610(.{8})?\}(.{8})?\$(.{8})?\)
(.{8})?\((.{8})?\?=(.{8})?\.(.{8})?\{71(.{8})?\}
  (.{8})?\((.{8})?\\(.{8})?\((.{8})?\\(.{8})?\.(.{8})?\\(.{8})?\{8(.{8})?\\(.{8})?\}
    (.{8})?\\(.{8})?\)(.{8})?\\(.{8})?\?(.{8})?\\(.{8})?\\
    (.{8})?\.(.{8})?\[(.{8})?\^(.{8})?\((.{8})?\](.{8})?\*(.{8})?\)(.{8})?\{57(.{8})?\}
  (.{8})?\\(.{8})?\)(.{8})?\\(.{8})?\{2(.{8})?\\(.{8})?\}
  (.{8})?\\(.{8})?\.(.{8})?\\(.{8})?\{12(.{8})?\\(.{8})?\}
  (.{8})?\\(.{8})?\$(.{8})?\\(.{8})?\/D(.{8})?\$(.{8})?\)(.{8})?\(){2}.{12}$/D

The basic regular expression
If lookahead is not allowed, the best I can do now is:
/\\(\\\(\\\\){2}/

which matches
\\(\\\(\\

If {m,n} quantifier is not allowed, it is impossible because nothing which can only match one string, can match a string longer than itself. Of course one can still invent something like \q which only matches /\q/, and still say expressions with that regular. But apparently nothing like this is supported by major implementations.

Impressive. I spent a while trying to get it to match something else, to no success.

I wasn't able to get a match either. As such I've marked this as the best answer. I will continue to follow the thread and update if a match is found/ a shorter answer discovered

@DylanMadisetti So nobody even wants a proof of why this is correct?

No you're right, I think a proof is in order. I removed the accepted answer for now.

@DylanMadisetti Well, I found a bug while writing something like a proof. It also matches this string: http://regex101.com/r/eC0qF2. I'll fix it soon.

how (the hell) could an human produce such a thing?

@xem Find a way to get your editor to highlight \2\, and things can be easier.

@DylanMadisetti Updated and now it has 289 characters. Also added some hints. Not so formal but I think it should be sufficient as a proof.

This deserves to be the highest voted answer on this site.

I've deleted the community wiki answer (which is not an answer and not seemed easily fixable). It's about a much shorter regex found here: http://www.nntp.perl.org/group/perl.fwp/2005/03/msg3754.html , which doesn't match the delimiters. One who fixed that should post a new answer.

This is the most absurd, incredible thing I've ever seen.

Is there any reason for \z rather than just $?

@primo Martin Büttner pointed out it would also match the regex with a trailing newline if $ is used. An alternative to \z is to use the D flag.

@AlexA. Too bad there isn't Hexagony Regex.

This answer redeems code ⛳ with its insanity. Wow. Totally t-shirt worthy

Someone tweeted this post so I got 49 upvotes in a day...

@jimmy23013 that's why I am here too.

@jimmy23013 Im here from that tweet too, and I literally only joined this site to upvote this :p

Funny thing is that this is the only answer to this question.

Hats off to you you crazy regex bastard

It's on HN now as well! Bravo sir!

I find that "golfing" the power and availability of the features used is a lot more impressive than golfing the byte count. The version that doesn't use anything more powerful or less widely available than lookaheads is a lot more impressive than the one that uses super-powerful features like (?R) and quirks of the \Q\E implementation, even if the other one is shorter.

So this is... pretty much... THE REGEX! It encompasses what it means to be a regex.

This problem might have been generated after someone found a solution, the other way is not possible.


text:
The 9 Billion Names of God
The 9 Billion Names of God is a short story by Arthur C. Clarke. It's about a group of Tibetan monks whose order is devoted to writing down all the possible names of God, written in their own alphabet. Essentially, they are devoted to writing every possible permutation of their alphabet, restricted by a few rules. In the story, the monastery hires some engineers to write a program to do all the work for them. Your goal is to write that program.
Rules:

The monk's alphabet uses 13 characters (according to my estimations). You may use ABCDEFGHIJKLM or some other set of 13 characters.
The minimum length of a possible name is 1 character. The maximum length is 9 characters.
No character may repeat more than 3 times in succession. AAABA is a valid name, but AAAAB is not.
Your program should print out (to a file) every possible name in sequence from A to MMMLMMMLM, separated by any character not in the alphabet (newlines, semi-colons, whatever).
This is code-golf, and you can use any language. The shortest solution by June 1st 2014 wins.

Edit: The names should start with A and end with MMMLMMMLM, progressing through all the billions of names sequentially. But the particular sequence is up to you. You can print out all the 1-letter names first, then all the 2-letter names, etc. Or you can print all the names starting with A, then all the ones starting with B, or some other pattern. But a human should be able to read through the file and confirm they are all there and in whatever logical order you choose, assuming they have the time.

Are you trying to end the universe, sir?

Link to the story, for anyone interested.

"The 11,459,252,883 Names of God"? It would be cool if the number of names were independently verified. It's 11,459,252,883 according to @edc65 's C answer, but the other answers appear too slow for this. (Except by actually enumerating the names, I don't know how to obtain the number.)

There's definitely a way to calculate it. Of course, in the story, the monks had more rules, lowering the number of possibilities.

@CSturgess: no, in the story the monks had the limit of 3 letters repeated and no more. Where Clarke wrote the story, maybe 40 years ago, he could just estimate the number of possibilities (short of calling IBM and renting some months of machine power)

1953 if fact ...

@edc65 No, they had more rules than that. They just said that one as an example. They never elaborated on the others.

@CSturgess - Certainly there's a combinatorial-style proof of the correct number of names defined by your rule-set, but we don't have such a proof at hand. (It might be a good question for Math SE.) The next best thing would be independent brute-force computations to verify that it's 11,459,252,883.

@CSturgess - sorry, going by memory, and I read that story 30 years ago.
I can't believe that in the last 60 years nobody tried to verify the number.

Here it is! http://math.stackexchange.com/a/34292

Wait a minute, a british billion is different from an American billion? That changes everything. That would mean a 28 character alphabet instead of 13. I wonder if that would change the scope of the problem at all?

This verifies that the number of names in the present problem is indeed 11,459,252,883 (as found in edc65's C program). Implementing Ross Millikan's solution at MathSE generates the following polynomial formula for the number of names with length <= 9, for variable alphabet size k: f(k) = k^9 + k^8 + k^7 - 5*k^6 + k^5 + k^4 + 4*k^3 - 2*k^2 + k. Sage implementation: https://goo.gl/0srwhq

@edc65 - See my "answer" below, which uses a Sage implementation to generate the polynomial formula for the number of names as a function of variable alphabet size.

@edc65 - A better answer from that question is this one, I think.   It points out: Everyone here seems to think that (in the story) the two hired engineers printed out a 9 billion word list. People here are trying to calculate which n-letter alphabet system gives 9 billion words. The list that the engineers printed was much longer than 9 billion.  The 11,459,252,883 possibilities just included the 9 billion names.

I'd recommend against generating the list. According to my calculations the table is around 107GB (ignoring the 3 character repetition rule, including a newline characters after each name).

@awashburn 113,637,155,697 including the 3 characters repetion rule, newlines and no padding. I actually built the file. [http://codegolf.stackexchange.com/a/28876/21348]

@edc65 So 105.8GB all said and done! I'm glad the stars didn't go out... or maybe you have to print the list for that to happen...?

Ruby, 46
?A.upto(?M*9){|s|s[/(.)\1{3}|[N-Z]/]||puts(s)}

My original, similar solution was longer and wrong (it output base13 numbers, which isn't quite all of them due to leading zeroes), but I'll leave it here because it got votes anyway.
1.upto(13**9){|i|(s=i.to_s 13)[/(.)\1{3}/]||puts(s)}

Should be base14

Yeah, it belatedly occurs to me that this omits names of God that have leading 0's. I don't think base14 works out of the box either though, since it's a 14-character alphabet.

Well I ran your code for about an hour and got up to 2 billion names and a 21 GB text file before seeing this and quitting it. I underestimated just how large the file would be.

@CSturgess Well, Ruby isn't the fastest language for this sort of thing out there...

@BenjiWiebe But still faster than being handwritten by monks!

Accepting this one because it has more votes.

Not posting this as a separate answer, as it requires an immensely huge amount of memory (~30 TB, if my calculation is correct), but in theory you can shorten this to 43 characters with k=*?A..?M*9;puts k-k.grep(/(.)\1{3}|[N-Z]/)

Ran it to 5 characters and it looks like a new winner, tied with DigitalTrauma! Unfortunately it's past the deadline.

C 140 177 235
Good old procedural style, no fancyness.
It counts (no write) 11,459,252,883 names in 8 minutes.
Next edit with the runtime and size of names file. Watch the sky...
Runtime 57 minutes, file size 126,051,781,713 (9 chars+crlf per row). Please tell me the monks' email address, so that I can send them the zipped file, for manual check...
Edit Golfed a little more, reworked the check for repeated letters.
Still not the shortest, but at least this one terminates and generates the required output.
Runtime 51 min, file size 113,637,155,697 (no leading blanks this time)
A side note: obviously the output file is very compressible, still I had to kill 7zip, after working 36 hours it was at 70%. Weird.
char n[]="@@@@@@@@@@";p=9,q,r;main(){while(p)if(++n[p]>77)n[p--]=65;else for(r=q=p=9;r&7;)(r+=r+(n[q]!=n[q-1])),n[--q]<65&&puts(n+q+1,r=0);}

Ungolfed
char n[]="@@@@@@@@@@";
p=9,q,r;
main()
{
    while (p)
    {
        if (++n[p] > 77)
        {
            n[p--] = 65; // when max reached, set to min and move pointer to left
        }
        else
        {
            for (r=q=p=9; r & 7 ;) // r must start as any odd number
            {
                r += r+(n[q]!=n[q-1])); // a bitmap: 1 means a difference, 000 means 4 letters equal
                n[--q] < 65 && puts(n+q+1,r=0);
            }
        }
    }
}

no #includes?

@SimonKuang, some compilers will put basic ones (stdio) in automatically.

@Simon it's C standard. By default, global objects are int and global functions return int. Visual studio outputs C4013 warning about 'puts' not defined, but it's valid anyway.

fits into a tweet!

Golfscript, 58 47 characters
"A"13
9?,{13base{65+}%n+}%{`{\4*/,}+78,1/%1-!},

Thanks to Peter Taylor, I am spared from the seppuku from not beating the Ruby solution! Run the code up to 10 yourself, and here is proof it skips the four-in-a-row numbers.

Easy saving: use n+ instead of ''+n. I think it's within the rules to use an alphabet with control characters, so you could also replace 65+ with 13+ and save another character by naming 13:^. And I think that 13,{ stuff [...] could be 13,1/{ stuff 4*.

My initial thought was that the saving would be via a filter, and with a bit of work it can be done. From 13, on can be replaced with {65+}%n+}%{ backtick {\4*/,}+78,1/%1-!}, for a total saving of 8, saving your life.

As long as the character is something that you can physically see, it will work. Really you could even include newlines as a character. Just so long as there's a sequence to the characters.

@PeterTaylor: You are a gentleman and a scholar!

After AAAM it should be AAABA, and not BAAAB, right?

Bash+Linux command line utils, 43 bytes
jot -w%x $[16**9]|egrep -v "[0ef]|(.)\1{3}"

This uses a similar technique to my answer below, but just counts in base 16, and strips out all "names" containing 0, e or f as well those with more than 3 same consecutive digits.
Convert to the monk's alphabet as follows:
jot -w%x $[16**9]|egrep -v "[0ef]|(.)\1{3}" | tr 1-9a-d A-M

Bash+coreutils (dc and egrep), 46 bytes
Edit - corrected version
dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)\1{3}"

This'll take a while to run but I think its correct.
dc counts downwards from 14^9 to 1 and outputs in base 14.  egrep filters out the numbers with more than 3 consecutive same digits.  We also filter out any names with "0" digits, so we get the correct set of letters in the names.
The question specifies that any alphabet may be used, so I am using [1-9][A-D].  But for testing, this can be transformed to [A-M] using tr:
dc<<<Edo9^[p1-d0\<m]dsmx|egrep -v "0|(.)\1{3}" | tr 1-9A-D A-M

This yields the sequence:
MMMLMMMLM MMMLMMMLL MMMLMMMLK ... AC AB AA M L K ... C B A

Note this dc command requires tail recursion to work.  This works on dc version 1.3.95 (Ubuntu 12.04) but not 1.3 (OSX Mavericks).

APL (59)
↑Z/⍨{~∨/,↑⍷∘⍵¨4/¨⎕A[⍳13]}¨Z←⊃,/{↓⍉⎕A[1+(⍵/13)⊤¯1⌽⍳13*⍵]}¨⍳9

Written in its own alphabet :)
It's a bit long. It also takes a long time to run with 9, try it with a lower number to test if you want.
Explanation:

{...}¨⍳9: for each number ⍵ from 1 to 9:

⍳13*⍵: get all numbers from 1 to 13^⍵
¯1⌽: rotate the list to the left by 1 (so we have 13^⍵, 1, 2, ..., 13^⍵-1, which turns into 0, 1, 2 ... modulo 13^⍵).
(⍵/13)⊤: encode each number in base 13 using ⍵ digits
⎕A[1+...]: add one (arrays are 1-indexed) and look up in ⎕A (the alphabet)
↓⍉: turn the matrix into a vector of vectors along the columns.

Z←⊃,/: join each inner vector of vectors together, giving us a list of possible names (but it doesn't meet the rules yet).
{...}¨: for each name, test if it meets the 4-repeated-chars rule:

4/¨⎕A[⍳13]: for each character, generate a string of 4 of that character
⍷∘⍵¨: for each string, test if it is present in ⍵
∨/,↑: take the logical or of all these tests,
~: and invert it, so that 1 means that it meets the rules and 0 means it doesn't.

Z/⍨: select from Z all the elements that meet the ruels
↑: display each one on a separate line

I'm disappointed.  Given its reputation, you'd think APL would have a one-character solution for this, that no keyboard could type.

@Mark, I am certain that APL does have that, but no one knows what the character is :)

one should write this onto a stone, and when future humans find this, they might just think it's just primitive written language.

Perl, 70 68 66 50 characters
$"=",";map/(.)\1{3}/||say,glob$i.="{@a}"for@a=A..M

Usage:
$ perl -E 'code' > output_file

The nice thing is that the prints are buffered, so you get all 1-character solutions printed first, followed by 2-character words and so on.

The best thing about this solution is the boob to the left of the 1.

Perl - 35 bytes
#!perl -l
/(.)\1{3}|[N-Z]/||print for A..1x9

Counting the shebang as one byte.
This is a loose translation of histocrat's answer.
A..1x9 is a bit of an oddity; this is shorthand for 'A'..'111111111'. The accumulator will never actually reach the terminal value (it contains only upper-case letters), but it will still terminate once it becomes longer than 9 characters long. This can be tested, for example, by using 1x4 instead.

Respect! Now why didn't I think of that? ;)

Note that Ruby doesn't have to create the entire range in order to iterate it, either. The only reason the code in my comment requires such a huge amount of memory is that it turns the range into an Array (so that it can use Array#-).

@Ventero Ahh yes, grep will do that. I'm not entirely fluent in Ruby.

Pyg (Waaay too long, for a language made for golfing)
whispers: 101...
Pe(*ItCh(((J(x)for x in ItPr("ABCDEFGHIJKLM",repeat=j)if not An((i*3 in x)for i in x))for j in R(14))))

Even though this is close to how I would actually do it in Python:
from itertools import *
for i in range(14):
    for j in ("".join(k) for k in product("ABCDEFGHIJKLM",repeat=i) if not any((i*3 in k) for i in k)):
        print j

Minus the long line complication of course ;)

Pyth, 34 characters
Kf<T"n"GJKFbJI>lb9Bb~Jm+bdfXVb*Y3K

Explanation:
Kf<T"n"G        K = list of letters in the alphabet before n.
JK              J = copy of K
FbJ             For b in J:
I>lb9B          If length of b > 9: break
b               print(b)
~J              J+=
~Jm+bd          J+=map(lambda d:b+d,
       XVb*Y3   index of Y*3 in reversed(b)
      fXVb*Y3K  filter for non-zero for Y in K on function index of Y*3 in reversed(b)
~Jm+bdfXVb*Y3K  J+=map(lambda d:b+d, filter(lambda Y:index of Y*3 in reversed(b), K))

Python 2 - 212 bytes
from itertools import chain,product as p
a='ABCDEFGHIJKLM'
q={c*4 for c in a}
c=0
for n in chain(*(p(*([a]*l)) for l in range(1,10))):
 n=''.join(n)
 if not any(u in n for u in q):print n
 c+=1
 if c==10**9:break

Japt, 21 bytes
Ep9 osE kè/0|(.)\1{3}

Try it online! (the link only computes up to 14**4.)
How it works
Ep9 osE kè/0|(.)\1{3}/

Ep9  14**9
osE  Range from 0 to n (exclusive), mapped through base-14 conversion
kè   Remove elements that match at least once...
/0|(.)\1{3}/  the regex that matches a zero or four times same char.

Assumes a standard ECMAScript 2017 implementation as the JS layer (and enough memory to store the array), where an Array object can have maximum of 2**53-1 length.