text:
Evaluate the number of possible strings a regex can match
In a chatroom with a few people, a topic came up between me and them about how many possible strings a regex could match.
Your task is to build a program that can answer that question.
Your program will accept, as input, any regular expression as defined in this document as an "extended regular expression", such as:
^[A-Za-z0-9]{8}$

and output the total number of possible strings that match that expression, outputting infinity if there are infinitely many:
218340105584896

Your program may also output too many if there are more than 263-1 possible strings that match the regex; however, it must not output infinity unless there are actually infinitely many strings.
The shortest program to do the above wins.

Should that regex be ^[A-Za-z0-9]{8}$?  Otherwise the answer would be infinity.

Which character encoding are we using?

@DigitalTrauma Perhaps assume the regex will be used in Java's String#match, which acts as if the ^ and $ are already there.

@JoeZ. You should probably link to a valid form of regex. This way, it is clear exactly what you want.

Sorry, DigitalTrauma, you're right. I'll edit it to reflect that.

@Quincunx: The question's been edited to include a definition.

The linked document defines two flavours of regex: which one should be used?

Curiously, although EREs actually are regular and the BRE isn't (backreferences mean that it can match some non-regular languages - although the lack of alternation means that it's not straightforward to say which is the more powerful of the two), they're probably harder to count. Alternation means that you have to take into account double-counting.

Actually, double-counting is still an issue with BREs, because it has a limited form of alternation: \(x\{m,n\}\)\1\{p,q\}.

Good luck getting a correct answer, Nevermind a golfed one

Can you output a different number type, like hexadecimal or binary or something else instead of decimal? Also if the number type represents infinity different is that okay?

@PeterTaylor I've edited the question to specifically ask for EREs.

Python 3370
I got this to be about as functional as I could, and even got alternation to work (with correct double-count checking!). As far as I know this works for everything except lookarounds (because that would be crazy).
For anyone writing their own solution feel free to use/improve my methods as much as you like.
Code:
R=range;L=len;E=enumerate;I=int;F="Infinity";S=sum;H=chr;D=ord;J=lambda l:''.join(l);U=lambda s:J([H(i)if H(i) not in s else''for i in R(1,128)]);s=' \n\t';c=J((H(i)if H(i)not in s else'')for i in R(1,32));d,l,u=[J(H(i)for i in R(*n))for n in [[48,59],[97,123],[65,91]]];p='`~!@#$%^&*()-_=+[{]}\\|;:\'",<.>/?';Y={'\\s':s,'\\S':c+s+p+u+l+d,'\\d':d,'\\D':U(d),'\\w':u+l+'_','\\W':U(u+l+'_'),'[:alnum:]':u+l+d,'[:alpha:]':u+l,'[:ascii:]':U(''),'[:blank:]':' \t','[:cntrl:]':c,'[:digit:]':d,'[:graph:]':p+d+l+u,'[:lower:]':l,'[:print:]':p+d+l+u+s,'[:punct:]':p,'[:space:]':s,'[:upper:]':u,'[:word:]':l+u+'_','[:xdigit:]':d+'ABCDEF'};C=lambda l,n:[d+[l[i]]for i in R(L(l))for d in C(l[i+1:],n-1)]if n>0 else[[]];O=lambda x:S([all((c in s)for s in [(e[1]if any(e[1] not in Y for e in x)else Y[e[1]])if e[0]=='e'else(e[1]if e[0]=='t'else((Y[e[1]]if e[1]in Y else B(e[1]))if e[0]=='['else''))for e in x])for c in Y['[:ascii:]']])
def X(r):
 x=[];l=0;c=''
 for h in r:
    l+=I(h in'([')-I(h in')]')
    if l<1 and'|'==h:x+=[c];c=''
    else:c+=h
 x+=[c]
 if L(x)>1:
    o=0;m=[];u=[]
    for e in x:
     p,b=X(e)
     if p==F:return F,[]
     o+=p;m+=[('(',b)];u+=[b]
    return o-S([(-1)**(i%2)*T(s) for i in R(2,L(u)+1)for s in C(u,i)]),[('|',m)]
 u=[];o=[];m=[];w=1
 while r!='':
    h=r[0];z=0
    if h in'([{':
     l=1;i=1
     while l>0:k=r[i];l+=(k==h)-(k=={'(':')','[':']','{':'}'}[h]);i+=1
     u+=[(h,r[1:i-1])];z=i
    elif h=='\\':u+=[('e','\\'+eval("'\\%s'"%r[1]))]if r[1]in'nt'else[('e','\\'+r[1])];z=2
    elif h in ['*','+','?']:u+=[('{',h)];z=1
    elif h in'^$':return 0
    elif h=='.':u+=[('[','[:ascii:]')];z=1
    else:u+=[('t',h)];z=1
    r=r[z:]
 for t,g in u:
    if t=='(':p,b=X(g);o+=[p];m+=[('(',b)]
    elif t=='e':o+=[L(Y[g])]if g in Y else[1]
    elif t=='[':o+=[N(g)]
    elif t=='{':
     n=o[-1]
     try:o[-1]=S([n**r for r in Q(g)])
     except:return F,[]
    elif t=='t':o+=[1]
    if t!='(':m+=[(t,g)]
 for c in o:
    if c==F:return F,[]
    w*=c
 return w,m
def N(s):
 if s in Y:return L(Y[s])
 if(s[0],s[-1])==('[',']'):return 1
 n=(s[0]=='^');a=0
 if n:s=s[1:]
 while s!='':
    if L(s)>=3 and s[1]=='-':a+=D(s[2])-D(s[0])+1;s=s[3:];continue
    a+=1;s=s[1:]
 return 256*n+(-1)**n*a
def Q(s):
 if s=='?':return[0,1]
 if s[0]in'*+':return None
 if ','in s:
    l,h=s.split(',')
    return None if h==''else R(I(l),I(h)+1)
 return[I(s)]
def B(s):
 n=(s[0]=='^')
 if n:s=s[1:]
 a='';w=''
 while s!='':
    h=s[0]
    if 3<=L(s)and'-'==s[1]:
     for i in R(D(s[0]),D(s[2])+1):a+=H(i)
     s=s[3:];continue
    a+=h;s=s[1:]
 return J([c*(c not in a)for c in Y['[:ascii:]']])if n else a
def T(x):
 if all(e==[] for e in x):return 1
 for i,e in E(x):
    if L(e)>=2 and e[1][0]=='{':return S([T([[e[0]]*n+e[2:]]+x[:i]+x[i+1:])for n in Q(e[1][1])])
    if L(e)>=1:
     if e[0][0] == '(':return T([e[0][1]+e[1:]]+x[:i]+x[i+1:])
     if e[0][0]== '|':
        t=S(T([[s]+e[1:]]+x[:i]+x[i+1:])for s in e[0][1])
        u=[[s]for s in e[0][1]]
        return t-S((-1)**(j%2)*T(b)for j in R(2,L(u)+1)for b in C(u,j))
 if any(e==[]for e in x):return 0
 return O([e[0]for e in x])*T([e[1:]for e in x])
r=raw_input();e=[];l=0;c=''
for h in r:
 l+=I(h in'([')-I(h in')]')
 if l<1 and'|'==h:e+=[c];c=''
 else:c+=h
e+=[c];o=[];x=[]
for f in e:
 if '^'!=f[0]or'$'!=f[-1]:print F;quit()
 n,m=X(f[1:-1])
 if n==F:print F;quit()
 o+=[n];x+=[m]
print S(o)-S([(-1)**(i%2)*T(s) for i in R(2,L(x)+1)for s in C(x,i)])

Ungolfed:
controlchars = ''
for i in range(1,32):
    if chr(i) not in '\t\n':
        controlchars += chr(i)

CLASSES={
'\\s':' \t\n',
'\\S':controlchars+'!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~',
'\\d':'0123456789',
'\\D':controlchars+'\n\t !"#$%&\'()*+,-./:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~',
'\\w':'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_',
'\\W':controlchars+'\n\t !"#$%&\'()*+,-./:;<=>?@[\\]^`{|}~',
'[:alnum:]':'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
'[:alpha:]':'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
'[:ascii:]':controlchars+'\n\t !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~',
'[:blank:]':' \t',
'[:cntrl:]':controlchars,
'[:digit:]':'0123456789',
'[:graph:]':'!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~',
'[:lower:]':'abcdefghijklmnopqrstuvwxyz',
'[:print:]':'\n\t !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~',
'[:punct:]':'`~!@#$%^&*()-_=+[{]}\\|;:\'",<.>/?',
'[:space:]':' \t\n',
'[:upper:]':'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'[:word:]':'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_',
'[:xdigit:]':'0123456789ABCDEF'
}

DELIMIT = {
'(':')',
')':'(',
'[':']',
']':'[',
'{':'}',
'}':'{'
}

def combos(lst,num):
    if num == 0:
        return [[]]
    combs = []
    for i in range(len(lst)):
        for c in combos(lst[i+1:],num-1):
            combs.append([lst[i]]+c)
    return combs

def count_regex(regex):
    exprs = []
    level = 0
    current = ''
    for char in regex:
        if char in '([':
            level += 1
        if char in ')]':
            level -= 1
        if char == '|' and level == 0:
            exprs.append(current)
            current = ''
        else:
            current += char
    exprs.append(current)

    comps = []
    expanded = []
    for e in exprs:
        if (e[0] != '^' or e[-1] != '$'):
            return 'Infinity'
        num,member = count_expr(e[1:-1])
        if num == 'Infinity':
            return 'Infinity'
        comps.append(num)
        expanded.append(member)

    total = sum(comps)
    for i in range(2,len(expanded)+1):
        for subset in combos(expanded,i):
            if i % 2 == 0:
                total -= count_doubles(subset)
            else:
                total += count_doubles(subset)
    return total

def count_expr(expr):
    exprs = []
    level = 0
    current = ''
    for char in expr:
        if char in '([':
            level += 1
        if char in ')]':
            level -= 1
        if char == '|' and level == 0:
            exprs.append(current)
            current = ''
        else:
            current += char
    exprs.append(current)

    if len(exprs) != 1:
        comps = 0
        members = []
        sub = []
        for e in exprs:
            comp,memb = count_expr(e)
            if comp == 'Infinity':
                return 'Infinity',[]
            comps += comp
            members.append(('(',memb))
            sub.append(memb)

        for i in range(2,len(sub)+1):
            for subset in combos(sub,i):
                if i % 2 == 0:
                    comps -= count_doubles(subset)
                else:
                    comps += count_doubles(subset)

        return comps,[('|',members)]

    sub = []
    while expr != '':
        char = expr[0]
        if char in ['(','[','{']:
            level = 1
            i = 1
            while level > 0:
                nchar = expr[i]
                if nchar == char: level += 1
                if nchar == DELIMIT[char]: level -= 1
                i += 1
            sub.append((char,expr[1:i-1]))
            expr = expr[i:]
        elif char == '\\':
            if expr[1] == 'n':
                sub.append(('e','\\'+'\n'))
                expr = expr[2:]
            elif expr[1] == 't':
                sub.append(('e','\\'+'\t'))
                expr = expr[2:]
            else:
                sub.append(('e','\\'+expr[1]))
                expr = expr[2:]
        elif char in ['*','+','?']:
            sub.append(('{',char))
            expr = expr[1:]
        else:
            if char in '^$':
                return 0
            if char == '.':
                sub.append(('[','[:ascii:]'))
                expr = expr[1:]
            else:
                sub.append(('t',char))
                expr = expr[1:]

    components = []
    members = []
    for t,string in sub:
        if t == '(':
            comp,memb = count_expr(string)
            components.append(comp)
            members.append(('(',memb))
        elif t == 'e':
            if string in CLASSES:
                components.append(len(CLASSES[string]))
            else:
                components.append(1)
        elif t == '[':
            components.append(count_class(string))
        elif t == '{':
            num = components[-1]
            try:
                components[-1] = sum([num**r for r in count_quantifier(string)])
            except TypeError:
                return 'Infinity',[]
        elif t == 't':
            components.append(1)

        if t != '(':
            members.append((t,string))

    total = 1
    for c in components:
        if c == 'Infinity':
            return 'Infinity',[]
        total *= c
    return total,members

def count_class(string):
    if string in CLASSES:
        return len(CLASSES[string])
    if string[0] == '[' and string[-1] == ']':
        return 1
    negate = (string[0] == '^')
    if negate: string = string[1:]
    avail_count = 0
    while string != '':
        char = string[0]
        if len(string) >= 3:
            if string[1] == '-':
                first,last = string[0],string[2]
                avail_count += ord(last)-ord(first)+1
                string = string[3:]
                continue
        avail_count += 1
        string = string[1:]
    if negate:
        return 256-avail-count
    return avail_count

def count_quantifier(string):
    if string == '?':
        return [0,1]
    if string[0] in '*+':
        return None
    if ',' in string:
        low,high = string.split(',')
        if high == '':
            return None
        return range(int(low),int(high)+1)
    return [int(string)]

def bracket_string(string):
    negate = (string[0] == '^')
    if negate: string = string[1:]
    avail = ''
    while string != '':
        char = string[0]
        if len(string) >= 3:
            if string[1] == '-':
                first,last = string[0],string[2]
                for i in range(ord(first),ord(last)+1):
                    avail += chr(i)
                string = string[3:]
                continue
        avail += char
        string = string[1:]
    if negate:
        new = ''
        for c in CLASSES['[:ascii:]']:
            if c not in avail:
                new += c
        return new
    return avail

def overlap(es):
    chars=['' for i in range(len(es))]
    for i,e in enumerate(es):
        if e[0] == 'e':
            if any(e[1] not in CLASSES for e in es):
                chars[i] = e[1]
            else:
                chars[i] = CLASSES[e[1]]

    for i,e in enumerate(es):
        if e[0] == 't':
            chars[i] = e[1]

    for i,e in enumerate(es):
        if e[0] == '[':
            if e[1] in CLASSES:
                chars[i] = CLASSES[e[1]]
            else:
                chars[i] = bracket_string(e[1])

    total = 0
    for c in CLASSES['[:ascii:]']:
        has = True
        for chs in chars:
            if c not in chs:
                has = False
                break
        if has:
            total += 1
    return total

def count_doubles(exprs):
    if all(e==[] for e in exprs):
        return 1

    for i,expr in enumerate(exprs):
        if len(expr) >= 2 and expr[1][0] == '{':
            rng = count_quantifier(expr[1][1])
            total = 0
            for n in rng:
                total += count_doubles([ [expr[0]]*n+expr[2:] ] + exprs[:i] + exprs[i+1:])
            return total

    for i,expr in enumerate(exprs):
        if len(expr) >= 1 and expr[0][0] == '(':
            return count_doubles([ expr[0][1]+expr[1:] ] + exprs[:i] + exprs[i+1:] )

    if any(e==[] for e in exprs):
        return 0

    for i,expr in enumerate(exprs):
        if expr[0][0] == '|':
            total = 0
            subs = []
            for sub_expr in expr[0][1]:
                subs.append([sub_expr])
                total += count_doubles([ [sub_expr]+expr[1:] ] + exprs[:i] + exprs[i+1:])

            for j in range(2,len(subs)+1):
                for subset in combos(subs,j):
                    if j % 2 == 0:
                        total -= count_doubles(subset)
                    else:
                        total += count_doubles(subset)

            return total

    over = overlap([e[0] for e in exprs])
    if over == 0:
        return 0
    return  over * count_doubles([e[1:] for e in exprs])

reg = raw_input('Regex: ')
print count_regex(reg)

Here are some relevant test cases I have confirmed:
Regex: ^[A-Za-z0-9]{8}$
218340105584896

Regex: ^([a-b]*)$
Infinity

Regex: ^([0-9]|[a-e])([a-e]|[A-E])$|^[a-f]{2}$
161

Regex: ^[a-z]{2}$|^[0-9]?[a-z]{2,3}$|^a[a-z]?$
200773

Regex: ^([a-z]|[a-e]|[A-E]|[3-4]|[D-G])$
35

Regex: ^\(.)\(.)\2\1$
16129*

Regex: ^(a)\1?$
2

Regex: ^[[:space:]]$|^\t$
3

*This is actually different in the golfed and ungolfed due to a one character difference in what is defined as valid ascii. I believe the golfed is the more correct one.
To confirm its accuracy further tests could be done, please let me know of any errors (I honestly would not be surprised if there were quite a few).

That's crazy.

Worth an upvote. xfix, you meant this one?

@ace Oh thanks for adding syntax highlighting. I'm relatively new to the site and didn't know you could do that.

You're welcome. To use syntax highlighting here, you can add an HTML comment <!-- language: lang-code --> (for one piece of code) or <!-- language-all: lang-code --> (for all codes in one post), where lang-code is the language code of your language. Ensure that the format is exactly the same (with spaces etc). The list of language codes can be found here. (You have to scroll down a bit.) I'm not sure whether using tags will work, so just stick to the language codes. :)

(^)$ gives me Infinity, but otherwise, this solution is good. You will get the bounty after the 24 hours period expires (as it seems I cannot instantly give a bounty).

KSab has gone where no man would dare to go...

source: Stack Exchange

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

sort: votes


text:
Find the smallest prime from a substring
In 1946 Erdos and Copeland proved that a certain number is a normal number, i.e. the digits in its decimal expansion are uniformly distributed.
Users will input a sequence of digits and you will find the smallest prime that contains that string in base 10.
Example:
input   -> output
"10"    -> 101
"03"    -> 103
"222"   -> 2221
"98765" -> 987659

Shortest code in bytes wins. I do know that some languages (mathematica, sage, pari-gp...) come with built-in functions related to primes. -50 bytes if your program doesn't rely on such functions. Don't try to cheat on this please, if your language already has a huge advantage don't claim the bonus.
Edit
According to a few comments below, the smallest prime that contains "03" is 3. Does this really make a difference? The only thing I can think of is that maybe numbers are easier to handle than strings.
In cases like "03" the preferred output would be 103. However, I don't consider it to be the fundamental part of your program, so you're free to ignore any leading zero if it grants you a lower byte count.

This seems like a nice base for a Project Euler task

The smallest prime containing "03" is 03. Maybe you should add a rule clarifying that the input may contain leading zeros but the output may not.

@steveverrill there's no such number as 03. If you meant 3, then that doesn't  contain "03".

@JanDvorak 03 is a valid representation of the number 3. (2.9... recurring infinitely, equivalent to 2+9/9, is also considered by some a valid representation.) I understand from the example given that 03 is not an acceptable representation for this question. This is a pedant point, but given the usual abuse of the rules, one I think is worth making.

I think the better way to phrase it would be to find the smallest number that, when converted to a string, would contain "03".

This seems like it'd be a fun fastest code challange

Golfscipt, 33 32 bytes = -18 score
2{:x,2>{x\%!},!!x`3$?)!|}{)}/;;x

Explanation:

2{...}{)}/ - starting with 2, while something is true, increment the top of the stack

;;x - discard the intermediate values collected by {}{}/ and the input, then put the last value tested there

:x,2> - store the value as x, then produce a list from 2 to x-1

{x\%!},!! - keep those that x is divisible by, then coerce to boolean (not empty)

x`3?)! - look up the input in the text form of x (-1 if not found), increment, negate.

| - or

Haskell program, 97 characters = 47 score
main=getLine>>= \i->print$head$[x|x<-[2..],all((/=0).mod x)[2..x-1],i`Data.List.isInfixOf`show x]

Haskell function, 75 characters = 25 score
p i=head$[x|x<-[2..],all((/=0).mod x)[2..x-1],i`Data.List.isInfixOf`show x]

the type of p is (Integral a, Show a) => [Char] -> a. If you supply your own integral type, you can lookup by infix in your own representation of those values. The standard Integer uses the expected decimal notation for integers.
Not very fast. Quadratic in the value (not size) of the output.
ungolfed version:
import Data.List
leastPrime infix = head $ filter prime' [2..]
  where prime' x  = all (\n-> x`mod`n /= 0) [2..x-1]
                 && i `isInfixOf` show x
main = print . leastPrime =<< getLine

example:
Prelude> let p i=head$[x|x<-[2..],all((/=0).mod x)[2..x-1],i`Data.List.isInfixOf`show x]
Prelude> p "0"
101
Prelude> p "00"
1009
Prelude> p "000" -- long pause
10007

Mathematica 58
(n=1;While[StringCases[ToString[p=Prime@n],#]=={},n++];p)&

Relative Timings on my Mac (2.6 GHz i7 with 8 GB memory).
Find the smallest prime containing "01".
AbsoluteTiming[(n = 1; While[StringCases[ToString[p = Prime@n], #] == {}, n++]; p) &["01"]]

{0.000217, 101}

Find the smallest prime containing "012345".
AbsoluteTiming[(n = 1; While[StringCases[ToString[p = Prime@n], #] == {}, n++]; p) &["012345"]]

{5.021915, 10123457}

Find the smallest prime containing "0123456".
AbsoluteTiming[(n = 1; While[StringCases[ToString[p = Prime@n], #] == {}, n++]; p) &["0123456"]]

{87.056245, 201234563}

You can use StringFreeQ to make it shorter.

Java - 175 characters.
class s{public static void main(String[]a){int i,n=2,p;for(;;){p=1;for(i=3;i<n;i++)if(n%i==0)p=0;if((n==2||p>0)&&(""+n).indexOf(a[0])>=0) {System.out.println(n);break;}n++;}}}

You can save 1 character by dropping the space between indexOf(a[0])>=0) and {System.out.println(n).

I think you can easily save (about 8) characters by replacing your boolean p=true by something like int p=1 and so on.

declaring all your ints at once will further reduce your program size.

shell oneliner (coreutils): 45chars
Not defining a function here... just a oneliner that takes one argument in $n and scans the integer range (actually a bit more to make code shorter). The 55 character version:
seq 5e9|grep $n|factor|awk '{if(NF==2)print $2}'|head -n1

It's not even too slow. For n=0123456 it returns 201234563 in 81.715s. That's impressively fast for a long pipeline with two string processors.
Removing two characters (down to 53) and one pipe, we can get it running even faster:
seq 5e9|grep $n|factor|awk '{if(NF==2){print $2;exit}}'

And finally, some sed wizardry to bring it down to 45 characters, although the printout is ugly:
seq 5e9|grep $n|factor|sed -n '/: \w*$/{p;q}'

n=000 -> 10007: 10007 (user 0.017s)
n=012345 -> 10123457: 10123457 (user 7.11s)
n=0123456 -> 201234563: 201234563 (user 66.8s)

Sage, 72
Runs in the interactive prompt
a=raw_input()
i=0
p=2
while a not in str(p):i+=1;p=Primes().unrank(i)
p

Primes().unrank(i) gives the ith prime number, with the 0th prime being 2.

R, 56chars -50 = 6
k=2;n=scan(,"");while(!grepl(n,k)|sum(!k%%2:k)>1)k=k+1;k

Take input as stdin. Increments k until k is a prime (tested by summing the instances for which k mod 2 to k are zeroes, hence FALSE since 0 turned into a logical is FALSE) and contains the string given as input (tested with a simple grep, here grepl since we want a logical as result).
Usage:
> k=2;n=scan(,"");while(!grepl(n,k)|sum(!k%%2:k)>1)k=k+1;k
1: "03"
2:
Read 1 item
[1] 103
> k=2;n=scan(,"");while(!grepl(n,k)|sum(!k%%2:k)>1)k=k+1;k
1: "003"
2:
Read 1 item
[1] 2003

J - 38 char -50 = -12 pts
Normally in J, you'd be using the very optimized builtins dedicated to primes, so I'm not going to apologize for any slowness in execution.
>:@]^:(>./@(E.":)*:]=*/@(+.i.)@])^:_&2

Explained:

>:@]^:(...)^:_&2 - Starting with 2, increment until (...) returns false.
(+.i.)@] - Take the GCD of the counter with every integer smaller than it. (We use the convention GCD(X,0) = X.)
]=*/@ - Take the product of all these numbers, and test for equality to the counter. If the counter is prime, the list was all 1s, except for the GCD with 0; else there will be at least one GCD that is greater than 1, so the product will be greater than the counter.
>./@(E.":) - Test if the string representation of the counter (":) contains the string (E.) at any point. >./ is the max function, and we use it because E. returns a boolean vector with a 1 wherever the substring begins in the main string.
*: - Logical NAND the results together. This will be false only if both inputs were true, i.e. if the counter both was prime and contained the substring.

Usage:
   >:@]^:(>./@(E.":)*:]=*/@(+.i.)@])^:_&2 '03'
103
   >:@]^:(>./@(E.":)*:]=*/@(+.i.)@])^:_&2 '713'
2713

For posterity, here's the version using the prime builtin (30 char long, but no bonus):
>:@]^:(>./@(E.":)*:1 p:])^:_&2

1 p:] tests the counter for primality, instead of the GCD trick.

Brachylog (v2), 3 bytes in Brachylog's encoding
ṗ≜s

Try it online!
Function submission, taking input from the right-hand argument, giving output by mutating the left-hand argument. (This is the opposite of the normal Brachylog convention; see this meta post for more discussion. Swapping the arguments into the more usual order would cost three bytes.) The TIO link has a wrapper which calls the function with the appropriate calling convention and prints the result.
Explanation
ṗ≜s
 ≜   Find the integer closest to zero
ṗ      which is prime {implicit: and output it via the left argument}
  s    and which is a substring of the {right argument}

Sadly, Brachylog is so appropriate for this problem that according to the rules in the problem, I can't even attempt to go for the bonus (which ironically means that it's incapable of winning).
One of the reasons I like Brachylog so much is that programming is a communication between human and computer, and thus a "perfect" language would let you just translate the problem specification into English directly; the ideas via which the problem was stated, and via which the program is written, would be the same. Brachylog can hit this ideal surprisingly often; the question here is "find the smallest prime containing a given substring", and I can literally string together the concepts of "smallest, prime, containing substring" in the correct order and have a working program. As such, Brachylog says much more about the nature of communication than a language in which you had to explicitly specify an algorithm for solving the problem would; sometimes when talking to other humans, we try to explain a problem by explaining the steps you'd take to solve it, but that's rare. So why should our languages be any different?

JavaScript 83 bytes = 33 score
Golfed:
for(s=prompt(n=x=0);!n;x++)for(n=(''+x).match(s)?2:0;n&&n<x;n=x%n?n+1:0);alert(x-1)

Ungolfed (a bit):
s=prompt() // get the input
n = 0
for(x=0;!n;x++) // stop when n is non-zero
    if ((''+x).match(s)) { // if x matches the pattern, check if x is prime
        for(n=2;n&&n<x;)
            n = (x%n == 0) ? 0 : n+1; // if x%n is zero, x is not prime so set n=0
        // if n is non-zero here, x is prime and matches the pattern
    }
alert(x-1)

Javascript (Node.JS) - 93 bytes = 43 points
l:for(i=x=process.argv[2];j=i;i++){while(--j>2)if(!(i%j*(""+i).match(x)))continue l
throw i}

In extracted form with sensible variable names:
outerLoop:for (currentTry=inputNumber=process.argv[2]; primeIterator=currentTry; currentTry++ ) {
    while (--primeIterator > 2)
        if(!(currentTry % primeIterator * (""+currentTry).match(inputNumber)))
            continue outerLoop;
    throw i
}

Rust 0.9 136 bytes = 86 points
fn main(){
   let mut n:u32=2;
   while n.to_str().find_str(std::os::args()[1])==None ||
         range(2,n).find(|&x|n%x==0)!=None {
      n=n+1;
   }
   print!("{}",n);
}

Very explicit despite for compactness.
Too much space spent on the string find. :(
Here the version without whitespace (136 char)
fn main(){let mut n:u32=2;while n.to_str().find_str(std::os::args()[1])==None||range(2,n).find(|&x|n%x==0)!=None{n=n+1;}print!("{}",n);}

Japt, 10 bytes
_j *ZsøU}a

Try it

Python 3, 80 79 bytes - 50 = 30 29 score
-1 byte thanks to @ASCII-only's creative use of %s instead of str
Test case "98765" has not been confirmed yet because of how long it is taking to test Confirmed for test case "98765" after a couple of hours, but with a similar approach that utilizes short-circuit evaluation to avoid some primality testing it works much faster. Alternatively, this can be ~2x as fast if we know that "2" is not an input (we can avoid checking even numbers for primality) by setting i=3 initially and i+=2 in the loop, at no extra byte cost.
def f(x):
 i=2
 while(x in"%s"%i)*all(i%j for j in range(2,i))-1:i+=1
 return i

Try it online!
Explanation of the while condition ((x in"%s"%i)*all(i%j for j in range(2,i))-1):
(x in"%s"%i): True/1 if the current counter contains the desired sequence of numbers in it; False/0 otherwise.
all(i%j for j in range(2,i)): True/1 if the current counter always has a remainder when divided by any integer from 2 (inclusive) to itself (exclusive), i.e. is prime; False/0 otherwise.
The * multiplies the two conditions together, and acts as an and operator - the product is True/1 if and only if both conditions are True/1.
The -1 acts as a not operator: False/0 - 1 results in -1, which is considered true, whereas True/1 - 1 results in 0, which is considered false. Thus, the loop continues while the number either does not contain the desired sequence of numbers or is not prime.
Replace the * with and and add parentheses around everything but the -1 for a much faster, equivalent solution (that is slightly longer).
A 76 byte - 50 = 26 score solution in Python 2 given by @ASCII-only (utilizes `` instead of str(),
def f(x):
 i=2
 while(x in`i`)*all(i%j for j in range(2,i))-1:i+=1
 return i

Try it online!

why not py2

@ASCII-only I haven't used python 2 much and mostly use python 3, so that's what I golf in. Though it seems that most of the time python 2 ends up being shorter...

You did a typo, in the first one you have return I

79

Tidy, 37 bytes
{s:s&{s,p:s in"".p}from primes|first}

Try it online!

Perl 6, 36 - 50 = -14 points
{$^a;first {/$a/&&$_%%one ^$_},2..*}

Try it online!
Considering $_%%one ^$_ is the only 2 bytes smaller larger than .is-prime, I think it's worth it for the bonus. This times out for the last test case.
Explanation:
{                                  }  # Anonymous code block
 $^a;                                 # Assign input to $a
     first                    ,2..*   # Find the first number
           {                 }        # Which
            /$a/                        # Contains the input
                &&                      # And
                  $_%%one ^$_           # Is prime

2 bytes smaller?

lol @ the part in the question that says "Don't try to cheat on this please, if your language already has a huge advantage don't claim the bonus."

@ASCII-only Well, I'm still being beaten by GolfScript, so... :$

JavaScript, 65 - 50 = 15 points
x=>(f=y=>(''+y).match(x)&&(p=n=>--n<2||y%n&&p(n))(y)?y:f(y+1))(x)

Try it online!

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:
Implement a reversi engine
Your job, for this golf, is to write a program that will take moves of a game of reversi (othello) and display the result to the user.
Input
A string of numbers taken from the range [0-7]. Each pair of numbers represent first the X coordinate, then the Y coordinate. Any characters not in that range should be ignored.
Output
A visual representation of the result of the game, including who is leading when the input ends. This may be graphical or keystroke output, but it must be a visual grid of the game, with a distinct character/graphical symbol for black, white, and empty.
Additionally, your code should output an error message and stop when an illegal move is entered (the same square more than once, or a square that will not flip any tiles).
Skips should be handled gracefully. A skip occurs when one color has no legal move, their turn is skipped and the other player gets to play.
Black always goes first.
Examples
23
........
........
........
..bbb...
...bw...
........
........
........
b

232425140504032627
........
........
........
b.bbb...
bbbww...
b.b.....
..b.....
..b.....
b

2324322513
........
........
........
..bbb...
..www...
........
........
........
e

23242555
........
........
........
..bbb...
..bbw...
..b.....
........
........
e

How can you tell from what point the piece moved? in your first example there is only 1 possibility, but is it safe to assume there is always 1 possibility?

I'm sorry I don't understand the question

@TeunPronk in reversi no piece is moved. Each player takes turn adding pieces to the board. I assume that should answer your question.

How are we supposed to interpret more than one pair of numbers?

If an illegal move is entered, must we display the state of the field at the last valid move, or is it enough to just display an error message?

Haskell - 1493 bytes
In this version, there are no detailed error messages and the output is much more basic. The major change was replacing Either String a with Maybe a and since they are both monads, this was acheived by simply swapping Right a with Just a and Left String with Nothing.
{-# LANGUAGE OverloadedStrings #-}
import Prelude hiding ((>>=),concatMap,filter,foldl,head,last,map,null,replicate)
import Control.Applicative hiding (empty)
import Control.Monad hiding (replicateM)
import Data.Vector hiding ((++),concat,foldM,reverse,zip)
main=getLine>>= \s->h$t<$>(zip$cycle[w,v])<$>b s>>= \m->u(\b(c,x)->case d b x c of r@(Just _)->r;Nothing->if not$null$findIndices(\y->e$d b y c)$t[(x,y)|x<-[0..7],y<-[0..7]];then é;else d b x$not c)k$n m
 where b(x:y:s)=(:)(read [x],read [y])<$>b s;b(_:_)=é;b[]=è[];d b z c=let d=join$m(f b z c)$m(\v->(head v,last v))$replicateM 2$t[-1,0,1];in if null d;then Nothing;else u(\b (x,y)->case b!?y of Just r->(case r!?x of Just _->è$b//[(y,r//[(x,è c)])];Nothing->é);Nothing->é)b$n$d`snoc`z;e(Nothing)=w;e(Just _)=v;f b(x,y)c z@(u,v)=let r=x+u;s=y+v;t=(r,s);in (case g b t of Just(Just d)->if d==c;then l;else (case g b (r+u,s+v) of Just(Just _)->t`cons`f b t c z;_->l);Just(Nothing)->l;Nothing->l);g b(x,y)=(case b!?y of Just col->col!?x;Nothing->é);h(Just b)=p$(o$n$m(\r->o(n$m(\c->case c of Just False->"B";Just True->"W";Nothing->".")r)++"\n")b)++i(q(\(w,b)(rw,rb)->(w+rw,b+rb))(0,0)$m(\r->q(\s@(w,b)c->case c of Just True->(w+1,b);Just False->(w,b+1);_->s)(0,0)r)b);h Nothing=p"e";i(w,b)|w>b="W"++s w|b>w="B"++s b|v="N"++s(w+b);j=r 8 é;k=r 8 j//[(3,j//[(3,è v),(4,è w)]),(4,j//[(3,è w),(4,è v)])];l=empty;m=map;n=toList;o=concat;p=putStrLn;q=foldl;r=replicate;s=show;t=fromList;u=foldM;v=True;w=False;é=Nothing;è=Just

$ printf "232425140504032627" | ./nano-rve
........
........
........
B.BBB...
BBBWW...
B.B.....
..B.....
..B.....
B11

Original version - 4533 bytes
I will golf when there will be competition!
edit It has arrived
{-# LANGUAGE OverloadedStrings #-}
import Prelude hiding ((>>=),concatMap,filter,foldl,map,null,replicate)
import Control.Applicative hiding (empty)
import Control.Monad
import Data.Either
import Data.Vector hiding ((++),concat,foldM,reverse,zip)

type Case = Maybe Bool
type Board = Vector (Vector Case)
type Coord = (Int,Int)

-- fmap (toList) $ replicateM 2 [-1,0,1] -- minus (0,0)
directions :: Vector Coord
directions = fromList [(-1,-1),(-1,0),(-1,1),(0,-1),(0,1),(1,-1),(1,0),(1,1)]

--  [(x,y) | x <- [0..7], y <- [0..7]]
allCoords :: Vector Coord
allCoords = fromList [(0,0),(0,1),(0,2),(0,3),(0,4),(0,5),(0,6),(0,7),(1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),(2,7),(3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),(3,7),(4,0),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(4,7),(5,0),(5,1),(5,2),(5,3),(5,4),(5,5),(5,6),(5,7),(6,0),(6,1),(6,2),(6,3),(6,4),(6,5),(6,6),(6,7),(7,0),(7,1),(7,2),(7,3),(7,4),(7,5),(7,6),(7,7)]

initBoard :: Board
initBoard = vs // [(3,v1),(4,v2)]
    where va = replicate 8 Nothing
          v1 = va // [(3,Just True),(4,Just False)]
          v2 = va // [(3,Just False),(4,Just True)]
          vs = replicate 8 va

showBoard :: Board -> String
showBoard b = (concat $ toList $ map (showRow) b) ++ (showScore b)
    where showCase :: Case -> String
          showCase c = case c of
              Just False -> "░B"
              Just True -> "▓W"
              Nothing -> "██"
          showRow :: Vector Case -> String
          showRow r = concat (toList $ map (showCase) r) ++ "\n"

showScore :: Board -> String
showScore b = winner score ++ "\n"
    where scoreCase :: (Int,Int) -> (Maybe Bool) -> (Int,Int)
          scoreCase (w,b) (Just True) = (w+1,b)
          scoreCase (w,b) (Just False) = (w,b+1)
          scoreCase s _ = s
          scoreRow :: Vector Case -> (Int,Int)
          scoreRow r = foldl (scoreCase) (0,0) r
          score :: (Int,Int)
          score = foldl (\(w,b) (rw,rb) -> (w+rw,b+rb)) (0,0) $ map (scoreRow) b
          winner :: (Int,Int) -> String
          winner (w,b) | w > b = "White with " ++ show w ++ " against Black with " ++ show b ++ "."
                       | b > w = "Black with " ++ show b ++ " against White with " ++ show w ++ "."
                       | otherwise = "Nobody with " ++ show (w+b) ++ "."

printBoard :: Board -> IO ()
printBoard b = putStrLn $ showBoard b
pm :: Either String Board -> IO ()
pm (Right b) = printBoard b
pm (Left s)  = putStrLn s

lookupBoard :: Board -> Coord -> Either String Case
lookupBoard b (x,y) = case b !? y of
    Just col -> case col !? x of
        Just c -> Right c
        Nothing -> Left "x is out of bounds"
    Nothing -> Left "y is out of bounds"

updateBoard :: Board -> Coord -> Bool -> Either String Board
updateBoard b (x,y) c = case b !? y of
    Just r -> case r !? x of
        Just _ -> Right $ b // [(y,r // [(x,Just c)])]
        Nothing -> Left "x is out of bounds"
    Nothing -> Left "y is out of bounds"

makePath :: Board -> Coord -> Bool -> Coord -> Vector Coord
makePath b (x,y) c (px,py) = case lookupBoard b (nx,ny) of
        Right (Just pc) -> if pc == c
            then empty
            else case lookupBoard b (nx+px,ny+py) of
                Right (Just _) -> (nx,ny) `cons` makePath b (nx,ny) c (px,py)
                _ -> empty
        Right (Nothing) -> empty
        Left _ -> empty
    where nx = x+px
          ny = y+py

makeMove :: Board -> Coord -> Bool -> Either String Board
makeMove b xy@(x,y) c = if null cases
        then Left $ "impossible move " ++ show xy ++ "."
        else foldM (\ob (cx,cy) -> updateBoard ob (cx,cy) c) b $ toList $ cases `snoc` (x,y)
    where cases = join $ map (makePath b (x,y) c) directions

makeMoves :: Board -> Vector (Bool,Coord) -> Either String Board
makeMoves b ms = foldM (\ob (c,xy) -> case makeMove ob xy c of
    rb@(Right _) -> rb
    Left _ -> if not $ null $ findIndices (\xy -> isRight $ makeMove ob xy c) allCoords
        then Left $ "wrong move " ++ show xy ++ "."
        else makeMove ob xy (not c)) b $ toList ms

movesFromString :: String -> Either String (Vector (Bool,Coord))
movesFromString cs = fromList <$> (zip $ cycle [False,True]) <$> coords cs
    where coords (x:y:cs) = (:) (read [x],read [y]) <$> coords cs
          coords (_:cs) = Left "invalid coordinates string"
          coords [] = Right []

isRight :: Either a b -> Bool
isRight (Left _) = False
isRight (Right _) = True

main=getLine>>= \s->pm$movesFromString s>>=makeMoves initBoard

Note : Your second example should be 232425140504032627.
Tests
With screenshots to prevent eye burns.
$ printf "232425140504032627" | ./rve

$ printf "2324" | ./rve

$ printf "1" | ./rve
invalid coordinates string

$ printf "24" | ./rve
wrong move (2,4).

Is is possible to get impossible move (x,y) when you use innardics (functions from the innards of the program and that you should not use) and x/y is out of bounds.

Javascript (E6) 399 412 450
Edit: board display shorter and nicer, cut some char
V=(p,b)=>b[p]==(r=0)&&[1,8,9,10].map(d=>r|=(A=(p,d,c=0)=>b[p+=d]==-v?A(p,d,1)&&(b[p]=v):c&b[p]==v)(p,d)|A(p,-d))|r&&(b[p]=v)
L=console.log
l=prompt().replace(/[^0-7]/g,'')
for(i=B=[];++i<73;)B[i]=i%9?i-31&&i-41?i-32&&i-40?0:1:-1:-B
for(v=i=1;l[i];i+=2,v=-v)V(p=l[i]*9+-~l[i-1],B)||!B.some((x,i)=>V(i,[...B]))&&(V(p,B,v=-v))||L(l='Err')
t=0,L(B.map(x=>(t+=~~x,'\nO ☻'[x+2|0]))+(t?t<0?'O':'☻'+t:'='))

Ungolfed
V = (p, b) =>      // Verify a move and if it is legal, apply the move to the board
b[p]==(r=0) &&     // check if empty cell and init accumulator r
[1,8,9,10].map(d=> // Execute flip check for each of 4 positive direction (and 4 negative too)
  r |= (
  A=(p,d,c=0) =>   // Recursive function for flip check, if find it valid modify the board during return phase
  b[p+=d] == -v    // If position contains a disk of other color
   ? A(p,d,1) && (b[p]=v) // recursive call. Then if returns true, set the cell in the flip sequence
   : c & b[p]==v   // at end of check, if find the righe disk and if not the first call, return true
  )                // Definition of A function ends here
  (p,d)|A(p,-d)    // Call A 2 times with d and -2 to get all 8 directions
) | r              // now, r is true if any of the 8 flip checks has gone well
&& (b[p]=v);       // if true, set the verified cell too

L=console.log;

l=prompt().replace(/[^0-7]/g,'');            // Get input & discard invalid chars

for (i=B=[];++i<73;) // Create empty board as a single dimension array, NaN mark a row end
  B[i] = i%9
    ? i-31 && i-41
      ? i-32 && i-40
        ? 0: 1: -1: -B //starting values at center, -B evaluate to NaN

for(v=i=1;    // v is the disk color, init to 1 == black
  l[i];       // repeat while inside input string
  i+=2, v=-v) // to char of input at time, set color to opposite
    V( p=l[i]*9+-~l[i-1], B)      // calc position in p from the input, and call Verify
    ||                            // if not valid, could be Error or Skip
      !B.some((x,i)=>V(i,[...B])) // Check if there are no moves for the current color, for each cell call V on a copy of the board
      &&
      (V(p,B,v=-v)) // If no moves found, try to apply the move for the opposite color
    ||
      L(l='Err');   // If failed, it is Error. Change variable l to end the loop

t=0, // Display the board while counting disk difference into 't'
L(
  B.map(x=>(t+=~~x,'\nO ☻'[x+2|0])) // map array elements to suitable chars, then auto conversion to string give a nice effect
  + (t?t<0?'O':'☻'+t:'=')
) // Display leading and count difference or '='

Test
Test in javascript console (FireFox): 232425140504032627

, , , , , , , , ,
, , , , , , , , ,
, , , , , , , , ,
,☻, ,☻,☻,☻, , , ,
,☻,☻,☻,O,O, , , ,
,☻, ,☻, , , , , ,
, , ,☻, , , , , ,
, , ,☻, , , , , ,
☻9


text:
Most creative way to reverse a positive integer
Provided an input as an unsigned integer:
13457

Your function/subroutine should return:
75431

Since this is a popularity contest, be creative. Creative solutions use unusual or clever techniques to accomplish given task.
Constraints:

You cannot use arrays.
You cannot use strings.
No RTL Override (&#8238)

Brownie points for using creative arithmetics.
Since this is a popularity contest, I suggest not using the modulo (%) operator in your code.
About Leading zeroes:
If the input is:
12340

Then the output:
4321

would be acceptable.

Nope, uint all the way.

Unicode can be embedded in other contexts than just HTML. That RTL override codepoint could appear anywhere

@Gareth I updated the question.

Is it a duplicate of http://codegolf.stackexchange.com/questions/2823/shortest-way-to-reverse-a-number ?

@microbian No, that one was code-golf. This one is popularity-contest.

You probably need more exclusions if you want to see genuine creativity. e.g. Database tables, lists in languages where a list functions like an array.

Can we use python generator objects?

By "cannot use strings", do you mean that there cannot be any strings, or that we cannot use strings to reverse the integer?

You can use generators @JayanthKoushik.
No strings at all.

@Gareth Your comment freaked me out a little. "Did I really post something an hour ago??" :-)

@Gareth How is this possible? I am so confused...

@JonathanVanMatre What do you suggest to open it up more? Should I forbid the use of modulus, or something like that?

People will be ticked if you start changing rules now.  It seems to be going fine to me, just run your next challenge through the sandbox first: http://meta.codegolf.stackexchange.com/questions/1117/proposed-questions-sandbox-mark-ix

What if 1230 is the input? Are we allowed to output 321? (Otherwise, Strings are necessary).

@Quincunx not really, see my answer

The question is now ambiguous? What do you mean by 'suggest not using modulo'?  Can we use it or can we not?  Be clear.  Also how can the rule be changed all of a sudden where most of the answers so far are using that modulo.  By prohibiting modulo solutions will try to use arrays indirectly, like through lists and similar.  Is that allowed?

The leading zeros example doesn't make much sense since it doesn't reverse.

@Howard Sorry :( updated.

@microbian It is suggested not to use modulo, because that is the obvious solution, and this is a popularity contest.

and everyone uses modulo!

I'm voting to close this as off-topic because this lacks an objective validity criterion - "be creative" is subjective.

@Mego But two people voted to keep it open, and I don't understand why

@Mego Man, the popularity-contest tag itself uses the word "creativity" as criteria. I don't know how 2 years later this question could be decided to be off topic.

@duci9y We have since decided, as a community, that popcons must have objective validity criteria for what qualifies as a valid answer, and what specific qualities make an answer better than another. Relevant meta post: http://meta.codegolf.stackexchange.com/a/8093/45941

Mathematica, no modulo!
n = 14627;
length = Ceiling[Log[10, n]];
img = Rasterize[n, RasterSize -> 400, ImageSize -> 400];
box = Rasterize[n, "BoundingBox", RasterSize -> 400, ImageSize -> 400];
width = box[[1]]; height = box[[3]];
ToExpression[
 TextRecognize[
  ImageAssemble[
   ImageTake[img, {1, height}, #] & /@
    NestList[# - width/length &, {width - width/length, width},
     length - 1]]]]

Let's break it down.
First we use some "creative arithmetics" to find out how many digits are in the number: length = Ceiling[Log[10, n]];
Next, we Rasterize the number to a nice large image:

Now we query for the bounding box of that image, and populate the width and height (actually using the baseline offset instead of the image height, because MM adds some whitespace below the baseline in the image).
Next, NestList recursively subtracts the width of the image divided by the length of the string to enable ImageTake to pluck characters from the end of the image one by one, and those are reassembled by ImageAssemble to this image:

Then we pass that on to the TextRecognize function for optical character recognition, which at this image size and rasterization quality is able to impeccably recognize the final output and give us the integer:
72641

Logarithms and OCR - It's like chocolate and peanut butter!
New and improved
This version pads out the number to deal with the obstinate behavior of TextRecognize with small numbers, and then subtracts out the pad at the end. This even works for single-digit numbers!
Though, why you would run a reverse routine on a single number is a mystery to me. But just for the sake of completeness, I even made it work for inputs of zero and one, which would normally break because the floored log doesn't return 1 for them.
n = 1;
pad = 94949;
length = If[n == 1 || n == 0, 1, Ceiling[Log[10, n]]];
img = Rasterize[n + (pad*10^length), RasterSize -> 400,
   ImageSize -> 400];
padlength = length + 5;
box = ImageDimensions[img];
width = box[[1]]; height = box[[2]];
reversed =
  ImageResize[
   ImageAssemble[
    ImageTake[img, {1, height}, #] & /@
     NestList[# - width/padlength &, {width + 1 - width/padlength,
       width}, padlength - 1]], 200];
recognized = ToExpression[TextRecognize[reversed]];
(recognized - pad)/10^5

Beat me to it. You've got my vote!! [but I was going to use C#]

TextRegognize isn't working for small numbers. And you have typo in height = b[[3]];. Also check my answer too, please! :)

Another problem with TextRecognize, is that it returns a String, which isn't allowed and also you need to convert it back to number.

Thanks for spotting the typo...I was making the variable names more reader friendly before submitting and missed one. Also threw in the missing ToExpression. And I posted a revision that deals with the small numbers problem all the way to single digits.

Wow… that's elaborate!

That's probably one of the more creative solutions I've seen for these type of questions. I wouldn't think to consider OCR :p

I take admonitions to be creative to heart.  :)

Perl/LuaTeX/Tesseract
The following Perl script reads the number as command line argument, e.g.:
    1234567890
The following Perl script prints the number via LuaTeX. A virtual font is created on the fly that mirrors the digits horizontally.

Then the whole number is again mirrored horizontally:

The final image is reread via OCR (tesseract):
    0987654321
#!/usr/bin/env perl
use strict;
$^W=1;

# Get the number as program argument or use a fixed number with all digits.
$_ = shift // 1234567890;

$\="\n"; # append EOL, when printing

# Catch negative number
exit print "NaUI (Not an Unsigned Integer)" if $_ < 0;

# Catch number with one digit.
exit ! print if ($_ = $= = $_) < 10;

undef $\;

# Write TeX file for LuaTeX
open(OUT, '>', 'temp.tex') or die "!!! Error: Cannot write: $!\n";
print OUT<<"END_PRINT";
% Catcode setting for iniTeX (a TeX format is not needed)
\\catcode`\{=1
\\catcode`\}=2
\\def\\mynumber{$_}
END_PRINT
print OUT<<'END_PRINT';
\directlua{tex.enableprimitives('',tex.extraprimitives())}
\pdfoutput=1 % PDF output
% move origin to (0,0)
\pdfhorigin=0bp
\pdfvorigin=0bp
% magnify the result by 5
\mag=5000

% Create virtual font, where the digits are mirrored
\directlua{
  callback.register('define_font',
    function (name,size)
      if name == 'cmtt10-digits' then
        f = font.read_tfm('cmtt10',size)
        f.name = 'cmtt10-digits'
        f.type = 'virtual'
        f.fonts = {{ name = 'cmtt10', size = size }}
        for i,v in pairs(f.characters) do
          if (string.char(i)):find('[1234567890]') then
            v.commands = {
               {'right',f.characters[i].width},
               {'special','pdf: q -1 0 0 1 0 0 cm'},
               {'char',i},
               {'right',-f.characters[i].width},
               {'special','pdf: Q'},
            }
          else
            v.commands = {{'char',i}}
          end
        end
      else
        f = font.read_tfm(name,size)
      end
      return f
    end
  )
}

% Activate the new font
\font\myfont=cmtt10-digits\relax
\myfont

% Put the number in a box and add a margin (for tesseract)
\dimen0=5bp % margin
\setbox0=\hbox{\kern\dimen0 \mynumber\kern\dimen0}
\ht0=\dimexpr\ht0+\dimen0\relax
\dp0=\dimexpr\dp0+\dimen0\relax
\pdfpagewidth=\wd0
\pdfpageheight=\dimexpr\ht0+\dp0\relax

% For illustration only: Print the number with the reflected digits:
\shipout\copy0 % print the number with the reflected digits

% Final version on page 2: Print the box with the number, again mirrored
\shipout\hbox{%
  \kern\wd0
  \pdfliteral{q -1 0 0 1 0 0 cm}%
  \copy0
  \pdfliteral{Q}%
}

% End job, no matter, whether iniTeX, plain TeX or LaTeX
\csname @@end\endcsname\end
END_PRINT

system "luatex --ini temp.tex >/dev/null";
system qw[convert temp.pdf temp%d.png];
system "tesseract temp1.png temp >/dev/null 2>&1";

# debug versions with output on console
#system "luatex --ini temp.tex";
#system qw[convert temp.pdf temp%d.png];
#system "tesseract temp1.png temp";

# Output the result, remove empty lines
open(IN, '<', 'temp.txt') or die "!!! Error: Cannot open: $!\n";
chomp, print while <IN>;
print "\n";
close(IN);

__END__

+1 for TeX. We need more TeX answers!

Brainfuck
Basically, it is just an input-reversing program.
,[>,]<[.<]

UPD: As Sylwester pointed out in comments, in the classical Brainfuck interpreters/compilers (without possibility to going left from zero point in the memory array) this program would not work in the absence of '>' at the beginning, so the more stable version is:
>,[>,]<[.<]

Shortest Bf program I've ever seen. Also, really neat.

Without a > in the beginning to make a zero cell before the data this won't work in many interpreters/compilers.

That's a good point, @Sylwester, but in classical Brainfuck all the cells are set to 0 by default and you are starting with cell number 0, which is the first element of the memory array used, so it should not make a problem in a classical case, which is important.

@Danek true, all the cells are initialized to zero and the first thing you do is to read the first digit into the very first cell. [.<] has no zero cell to stop at because of that and will fail. Error from bf -n rev1.bf is Error: Out of range! Youwanted to '<' below the first cell.. If you compile you get a segfault perhaps.

@Sylwester, oh yeah, that's true! I'll add it to my answer, thanks a lot!

@Nit Well, you must be new here!

+1 too even if BF is all about arrays so I'm not sure it fits the rule Do not use array

@Michael, Brainfuck's array is just the only possibility to store data and, consequently, to access the input stream, so I believe it is OK.

@Nit echo is much shorter: ,[.,]

@Mig Technically, some implementations for BF run with a pointer pointing to an allocated region of space. Instead of incrementing the index of the array, the pointer is incremented, etc.

@Nit And technically, it's a Tape, not an Array.

Haskell
reverseNumber :: Integer -> Integer
reverseNumber x = reverseNumberR x e 0
    where e = 10 ^ (floor . logBase 10 $ fromIntegral x)

reverseNumberR :: Integer -> Integer -> Integer -> Integer
reverseNumberR 0 _ _ = 0
reverseNumberR x e n = d * 10 ^ n + reverseNumberR (x - d * e) (e `div` 10) (n + 1)
    where d = x `div` e

No arrays, strings, or modulus.
Also, I know we're not supposed to use lists or strings, but I love how short it is when you do that:
reverseNumber :: Integer -> Integer
reverseNumber = read . reverse . show

A bunch of site regulars had maxed out their voting for the day, so have patience.  :)

I suppose someone has to be the partypooper.
Bash
$ rev<<<[Input]

$ rev<<<321
123
$ rev<<<1234567890
0987654321

Size limitations depend on your shell, but you'll be fine within reason.

well played sir. well played

How is that not a string?

This might be a string. Are you sure bash takes input as integers when possible?

Everything is a string in Bash unless declared otherwise using for example declare -i. Compare foo=089 and declare -i foo=089 (invalid octal number).

As per the comment by @l0b0 this answer is invalid.

And even if bash thought it was a number, rev sure as hell doesn't. :)

rev operates on the data as a string: https://github.com/karelzak/util-linux/blob/master/text-utils/rev.c#L169

C++
/*
A one-liner RECUrsive reveRSE function. Observe that the reverse of a 32-bit unsigned int
can overflow the type (eg recurse (4294967295) = 5927694924 > UINT_MAX), thus the
return type of the function should be a 64-bit int.

Usage: recurse(n)
*/

int64_t recurse(uint32_t n, int64_t reverse=0L)
{
    return n ? recurse(n/10, n - (n/10)*10 + reverse * 10) : reverse;
}

Would be cooler with ?:

@mniip Good idea

1 Brilliant. Wish there were more upvotes.

Kudos for catching the overflow case.

Javascript
EDIT : Since there is a suggestion to not use % operator, I use a little trick now.
I know this is not a code-golf, but there is no reason to make it longer.
function r(n){v=0;while(n)v=n+10*(v-(n=~~(n/10)));return v}

r(13457) returns 75431
Moreover, it's a lot faster than string method (n.toString().split('').reverse().join('')) :

==> JSPerf report <==

What about using ~~ instead of Math.floor?

Yes that would be shorter, but less understandable.

Isn't this the textbook integer-reversal method? I think I've written this algorithm for homework.

As with the comment above, this is just the standard integer reversal algorithm. As far as I can see the creative part is just the usage of ~~ instead of Math.floor (the change suggested by @Victor)

+1 for performance testing. all the great creative minds do performance testing early and often.  :D

+1 ... although the comparison ain't fair since reverse() works for everything.

Python
Not sure if this implementation qualifies for creative math
Also % operator was not used per se, though one might argue that divmod does the same, but then then the Question needs to be rephrased :-)
Implementation
r=lambda n:divmod(n,10)[-1]*10**int(__import__("math").log10(n))+r(n /10)if n else 0

demo
>>> r(12345)
54321
>>> r(1)
1

How does it work?
This is a recursive divmod solution
*This solution determines the least significant digit and then pushes it to the end of the number.*
Yet Another Python Implementation
def reverse(n):
    def mod(n, m):
        return n - n / m * m
    _len = int(log10(n))
    return n/10**_len + mod(n, 10)*10**_len + reverse(mod(n, 10**_len)/10)*10 if n and _len else n

How does it work?
This is a recursive solution which swaps the extreme digits from the number
Reverse(n) = Swap_extreme(n) + Reverse(n % 10**int(log10(n)) / 10)
             ; n % 10**log10(n) / n is the number without the extreme digits
             ; int(log10(n)) is the number of digits - 1
             ; n % 10**int(log10(n)) drops the most significant digit
             ; n / 10 drops the least significant digit

Swap_extreme(n) = n/10**int(log10(n)) + n%10*10**int(log10(n))
             ; n%10 is the least significant digit
             ; n/10**int(log10(n)) is the most significant digit

Example Run
reverse(123456) = 123456/10^5 + 123456 % 10 * 10^5 + reverse(123456 % 10 ^ 5 / 10)
                = 1           + 6 * 10 ^ 5 + reverse(23456/10)
                = 1           + 600000     + reverse(2345)
                = 600001 + reverse(2345)
reverse(2345)   = 2345/10^3 + 2345 % 10 * 10^3 + reverse(2345 % 10 ^ 3 / 10)
                = 2         + 5 * 10^3 + reverse(345 / 10)
                = 2         + 5000     + reverse(34)
                = 5002                 + reverse(34)
reverse(34)     = 34/10^1 + 34 % 10 * 10^1 + reverse(34 % 10 ^ 1 / 10)
                = 3       + 40             + reverse(0)
                = 43 + reverse(0)
reverse(0)      = 0

Thus

reverse(123456) = 600001 + reverse(2345)
                = 600001 + 5002 + reverse(34)
                = 600001 + 5002 + 43 + reverse(0)
                = 600001 + 5002 + 43 + 0
                = 654321

It does. +5 brownie points.

@downvoter: Can you please respond what is wrong with this answer?

you, sir, deserve my thumbs up ...

Just to be contrary, an overuse of the modulo operator:
unsigned int reverse(unsigned int n)
    {return n*110000%1099999999%109999990%10999900%1099000%100000;}

Note that this always reverses 5 digits, and 32 bit integers will overflow for input values more than 39045.

C#
Here's a way to do it without the Modulus (%) operator and just simple arithmetic.
int x = 12356;
int inv = 0;
while (x > 0)
{
    inv = inv * 10 + (x - (x / 10) * 10);
    x = x / 10;
}
return inv;

You have modulus, you simply defined it yourself.

Yeah, I know. We're just not supposed to use the % operator. :) I see what you mean though, my text was a little misleading.

Bash
> fold -w1 <<<12345 | tac | tr -d '\n'
54321

C
#include <stdio.h>

int main(void) {
    int r = 0, x;
    scanf("%d", &x);
    while (x > 0) {
        int y = x;
        x = 0;
        while (y >= 10) { y -= 10; ++x; }
        r = r*10 + y;
    }
    printf("%d\n", r);
}

No strings, arrays, modulus or division. Instead, division by repeated subtraction.

 Mathematica
Making an image out of number, reflecting it, partitioning it into the digits. Then there is two alternatives:

Compare each image of a reflected digit with prepared earlier images, replace it with the corresponding digit and construct the number out of this.
Reflect every digit separately, construct a new image, and pass it to the image recognition function.

I did both
reflectNumber[n_?IntegerQ] :=
 ImageCrop[
  ImageReflect[
   Image@Graphics[
     Style[Text@NumberForm[n, NumberSeparator -> {".", ""}],
      FontFamily -> "Monospace", FontSize -> 72]],
   Left -> Right], {Max[44 Floor[Log10[n] + 1], 44], 60}]
reflectedDigits = reflectNumber /@ Range[0, 9];
reverse[0] := 0
reverse[n_?IntegerQ /; n > 0] :=
 Module[{digits},
  digits = ImagePartition[reflectNumber[1000 n], {44, 60}];
  {FromDigits[
    digits[[1]] /. (d_ :> # /; d == reflectedDigits[[# + 1]] & /@
       Range[0, 9])],
   ToExpression@
    TextRecognize[
     ImageAssemble[
      Map[ImageReflect[#, Left -> Right] &, digits, {2}]]]}]
reverse[14257893]
> {39875241, 39875241}

EDIT: Added padding of three zeroes, because TextRecognise works correctly only with integers > 999.

Kudos for the double reflection. Every good programmer should use reflection whenever possible. ;-) However, your first method doesn't work for your example on my system in MM9.

Now that's creative.

I got best results alternating 9 and 4 in my pad (all 9s or all 1s tended to give occasional OCR glitches), but that's probably down to the difference in fonts.

Lua
function assemble(n,...)
    if ... then
        return 10*assemble(...)+n
    end
    return 0
end
function disassemble(n,...)
    if n>0 then
        return disassemble(math.floor(n/10),n%10,...)
    end
    return ...
end
function reverse(n)
    return assemble(disassemble(n))
end

No arrays or strings used. The number is split into digits and reassembled using the arguments list.

Lua doesn't have arrays anyway. Has tables :P  Otherwise varargs are arrays

@Nowayz It has tables which can resemble arrays. Which is why I am not allowed to use them. And varargs aren't arrays :P

But you're using %! :P

Python2
Assumes "unsigned integer" is 32-bit
import math
import sys
a=input()
p=int(math.log(a, 10))
b=a
while b%10==0:
    sys.stdout.write('0') # if 1-char string is not allowed, use chr(48) instead
    b=b/10

if p==0:
    print a
elif p==1:
    print a%10*10+a/10
elif p==2:
    print a%10*100+a%100/10*10+a/100
elif p==3:
    print a%10*1000+a%100/10*100+a%1000/100*10+a/1000
elif p==4:
    print a%10*10000+a%100/10*1000+a%1000/100*100+a%10000/1000*10+a/10000
elif p==5:
    print a%10*100000+a%100/10*10000+a%1000/100*1000+a%10000/1000*100+a%100000/10000*10+a/100000
elif p==6:
    print a%10*1000000+a%100/10*100000+a%1000/100*10000+a%10000/1000*1000+a%100000/10000*100+a%1000000/100000*10+a/1000000
elif p==7:
    print a%10*10000000+a%100/10*1000000+a%1000/100*100000+a%10000/1000*10000+a%100000/10000*1000+a%1000000/100000*100+a%10000000/1000000*10+a/10000000
elif p==8:
    print a%10*100000000+a%100/10*10000000+a%1000/100*1000000+a%10000/1000*100000+a%100000/10000*10000+a%1000000/100000*1000+a%10000000/1000000*100+a%100000000/10000000*10+a/100000000
elif p==9:
    print a%10*1000000000+a%100/10*100000000+a%1000/100*10000000+a%10000/1000*1000000+a%100000/10000*100000+a%1000000/100000*10000+a%10000000/1000000*1000+a%100000000/10000000*100+a%1000000000/100000000*10+a/1000000000

When given input 1230, it outputs 0321.

I just saw the edit of modulus operator... should I delete this post?

I don't think you should delete it, because it is a suggestion to not use it, not a rule: "Since this is a popularity contest, I suggest not using the modulus (%) operator in your code."

Plus that huge if statement is practically ASCII art.

Postscript
/rev{0 exch{dup 10 mod 3 -1 roll 10 mul add exch 10 idiv dup 0 eq{pop exit}if}loop}def

No arrays, no strings, no variables.
gs -q -dBATCH -c '/rev{0 exch{dup 10 mod 3 -1 roll 10 mul add exch 10 idiv dup 0 eq{pop exit}if}loop}def 897251 rev ='
152798

The same without mod (which is just a shortcut, so no big difference):
/rev {
    0 exch {
        dup
        10 idiv dup
        3 1 roll 10 mul sub
        3 -1 roll 10 mul add exch
        dup 0 eq {pop exit} if
    } loop
} def

C
In that the obvious solution is represented in a couple other languages, might as well post it in C.
Golfed:

r;main(n){scanf("%d",&n);for(;n;n/=10)r=r*10+n%10;printf("%d",r);}

Ungolfed:

#include <stdio.h>

int main()
{
     int n, r = 0;
     scanf("%d", &n);
     for(;n;n/=10)
     {
          r = r * 10 + n % 10;
     }
     printf("%d", r);
}

EDIT: Just saw the modulus edit.
Golfed (no modulus):

r;main(n){scanf("%d",&n);for(;n;n/=10)r=r*10+(n-10*(n/10));printf("%d",r);}

Ungolfed (no modulus):

#include <stdio.h>

int main()
{
     int n, r, m = 0;
     scanf("%d", &n);
     for(;n;n/=10)
     {
          r=r*10+(n-10*(n/10));
     }
     printf("%d", r);
}

C#
This uses no strings or arrays, but does use the .NET Stack<T> type (EDIT: originally used modulus operator; now removed)
public class IntegerReverser
{
    public int Reverse(int input)
    {
        var digits = new System.Collections.Generic.Stack<int>();
        int working = input;
        while (working / 10 > 0)
        {
            digits.Push(working - ((working / 10) * 10));
            working = working / 10;
        }
        digits.Push(working);
        int result = 0;
        int mult = 1;
        while (digits.Count > 0)
        {
            result += digits.Pop() * mult;
            mult *= 10;
        }
        return result;
    }
}

python (easily done in assembly)
Reverses the bits of a byte. Points for not doing the exact same thing everyone else did?
x = int(input("byte: "), 2)
x = ((x * 8623620610) & 1136090292240) % 1023
print("{0:b}".format(x).zfill(8))

example
byte: 10101010
01010101

Would it work for the sample input to produce the sample output?

Java
This is the this i've come up with, no strings, no arrays... not even variables (in Java I mind you):
public static int reverse(int n) {
    return n/10>0?(int)(modulo(n,10)*Math.pow(10, count(n)))+reverse(n/10):(int)(modulo(n,10)*Math.pow(10,count(n)));
}

public static int count(int i) {
    return (i = i/10)>0?count(i)+1:0;
}

public static int modulo(int i,int j) {
    return (i-j)>=0?modulo(i-j, j):i;
}

EDIT A more readable version
/** Method to reverse an integer, without the use of String, Array (List), and %-operator */
public static int reverse(int n) {
    // Find first int to display
    int newInt = modulo(n,10);
    // Find it's position
    int intPos = (int) Math.pow(10, count(n));
    // The actual value
    newInt = newInt*intPos;
    // Either add newInt to the recursive call (next integer), or return the found
    return (n/10>0) ? newInt+reverse(n/10) : newInt;
}

/** Use the stack, with a recursive call, to count the integer position */
public static int count(int i) {
    return (i = i/10)>0?count(i)+1:0;
}

/** A replacement for the modulo operator */
public static int modulo(int i,int j) {
    return (i-j)>=0?modulo(i-j, j):i;
}

Please make your code more readable, this is not code golf. Thank you.

This is my first attempt at this, i hope the updated version is better :-)

Yes it is. Thank you. Welcome to Code Golf. I'm new too. :)

PowerShell
A quick solution in PowerShell.
No arrays or strings used, either implicitly or explicitly.
function rev([int]$n) {
    $x = 0
    while ($n -gt 0) {
        $x = $x * 10
        $x += $n % 10
        $n = [int][math]::Floor($n / 10)
    }
    $x
}

Testing:
PS > rev(13457)
75431

PS > rev(rev(13457))
13457

C++
#include<iostream>
#include<conio.h>
#include<fstream>
using namespace std;
int main()
{
    int i,size;
    float num;
    char ch;
    cout<<"enter the number \t: ";
    cin>>num;
    ofstream outf("tmp.tmp");
    outf<<num;
    outf.close();
    ifstream inf("tmp.tmp");
    inf.seekg(0,ios::end);
    size=inf.tellg();
    inf.seekg(-1,ios::cur);
    cout<<"Reverse of it\t\t: ";
    for(i=0;i<size;i++)
    {
        inf>>ch;
        if(ch!='0'||i!=0)
        cout<<ch;
        inf.seekg(-2,ios::cur);
    }
    inf.close();
            remove("tmp.tmp");
    getch();
    return 0;
}

OUTPUT
Three sample runs

Test with zeros

It too reverses floating numbers!!!

If you want to run this code then run it on your computer because it creates a temporary file during its run-time and I am not sure if online compilers would make a temporary file on your computer

Isn't writing to a file making it a string?

string is a combination of character with a null character at the end so, it is not a string but a combination of characters only

A string is a sequence of characters. Sorry, but this answer does not meet the constraints.

your definition to strings is wrong please go to this website (http://cs.stmarys.ca/~porter/csc/ref/c_cpp_strings.html) and read the last paragraph carefully.String is a combination of characters ENDED WITH A '\0'

That is just an implementation detail. The first few lines of the link you posted says, "The term string generally means an ordered sequence of characters, with a first character, a second character, and so on…"

char a={'a','b','c','d', '\0' };('a' is a string)    char a={'a','b','c','d'}; //'a' is a character combination but not a string.

I'm sorry, you are talking about C strings. I'm talking about strings in general. Your answer does not qualify.

ECMAScript 6
reverse=x=>{
    var k=-(l=(Math.log10(x)|0)),
        p=x=>Math.pow(10,x),
        s=x*p(l);
    for(;k;k++) s-=99*(x*p(k)|0)*p(l+k);
    return s
}

Then:

reverse(12345) outputs 54321
reverse(3240) outputs 423
reverse(6342975) outputs 5792436

Fission
$SX/
\S?L
K\O

This program reverses the input.
$ echo -n '12345' | fsn tac.fsn
54321

You just narrowly slip past the "Did the programming language exist before the question was asked?" test on this one. Fission looks like a cool entry to the esolang world - sort of "Befunge on acid with a shelf full of particle physics books." Nice!

FORTH
I think this is the opposite of popular... but using Forth is always creative...
Let's create a new word
: REV
  BEGIN
    S->D 10 U/
    SWAP 1 .R
  DUP 0= UNTIL
CR ;

Here, it uses word U/ that returns remainder and quotient, remainder is sent to output as number within a field 1 character long, until dividend is zero.
No string is used, at least until something is sent to video.
I do not use a modulo operator, instead I use integer division with remainder and quotient.
Let's try
12345 REV 54321
ok

Where do I get that emulator?

World of Spectrum has plenty of emulators listed here http://www.worldofspectrum.org/emulators.html

Turing Machine Code
Using the syntax from here.
0 * * l 0
0 _ # r 2
2 # # r 2
2 0 # l A
2 1 # l B
2 2 # l C
2 3 # l D
2 4 # l E
2 5 # l F
2 6 # l G
2 7 # l H
2 8 # l I
2 9 # l J
2 _ _ l Z
A * * l A
A _ 0 l Q
B * * l B
B _ 1 l Q
C * * l C
C _ 2 l Q
D * * l D
D _ 3 l Q
E * * l E
E _ 4 l Q
F * * l F
F _ 5 l Q
G * * l G
G _ 6 l Q
H * * l H
H _ 7 l Q
I * * l I
I _ 8 l Q
J * * l J
J _ 9 l Q
Q # # r 2
Q * * r Q
Z # _ l Z
Z * * l ZZ
ZZ _ * r ZZZ
ZZ * * l ZZ
ZZZ 0 _ r ZZZ
ZZZ * * * halt

Try it online!

Python
import itertools

def rev(n):
    l = next(m for m in itertools.count() if n/10**m == 0)
    return sum((n-n/10**(i+1)*10**(i+1))/10**i*10**(l-i-1) for i in range(l))

rev(1230) gives 321. I suppose it should really give 0321?

Is that wrong? If we are only dealing with numbers, not strings, then 0321 and 321 are equivalent right?

It should be 321 to my understanding.  The question disallowed using of strings.  So it should be 321.

I don't know... waiting for the OP's reply. I'm just pointing this out, not saying it's wrong. Sorry for the confusion.

I updated the question.

C
#include <stdio.h>

int c(int n) {
    return !n ? 0 : 1+c(n/10);
}

int p(int n) {
    return !n ? 1 : 10*p(n-1);
}

int r(int n) {
    return !n ? 0 : n%10*p(c(n/10))+r(n/10);
}

int main() {
    printf("%d\n", r(13457));

    return 0;
}

Batch
Missed the part about not using strings - oh well.
@echo off
setLocal enableDelayedExpansion enableExtensions
for /f %%a in ('copy /Z "%~dpf0" nul') do set "ASCII_13=%%a"
set num=%~1
set cnum=%num%
set len=0
:c
if defined num set num=%num:~1%&set /a len+=1&goto :c
set /a len-=1
for /L %%a in (%len%,-1,0) do set /p "=!ASCII_13!!cnum:~%%a,1!"<nul

Python 2
import math

def reverseNumber(num):
    length = int(math.ceil(math.log10(num)))
    reversed = 0

    for i in range(0, length):
        temp = num // math.pow(10, length - i - 1)
        num -= temp * math.pow(10, length - i - 1)
        reversed += int(temp * math.pow(10, i))

    return reversed

print reverseNumber(12345)

C#
private static int ReverseNumber(int forwardNumber)
{

    double forwardPower = 20;   //some number longer than Int32.MaxValue.Length
    double reversePower = 0;
    int reverseNumber=0;
    bool realNumberStarted=false;

    do
    {
        var tempInt= (int)(forwardNumber / Math.Pow(10, forwardPower));
        tempInt = (int)((((decimal)tempInt / 10) - (tempInt / 10))*10);
        if (tempInt>0 && !realNumberStarted)
        {
            realNumberStarted = true;
        }
        reverseNumber = reverseNumber+ tempInt * (int)Math.Pow(10, reversePower);
        if (realNumberStarted)
        {
            reversePower++;
        }

        forwardPower--;
    } while (forwardPower >=0);

    return reverseNumber;
}

Outputs
Console.WriteLine( ReverseNumber(12345));
Console.WriteLine(ReverseNumber(67584930));

54321
3948576

C
#include <stdio.h>
#include <stdint.h>

int main() {
    uint32_t n = 0;
    scanf("%u", &n);

    while (n) {
        uint64_t o = (uint64_t) n * 3435973837u;
        uint32_t r = o >> 35;
        putchar(n - r * 10 + '0');
        n = o >> 35;
    }

    return 0;
}

Convert division (with constant divisor) to multiplication. I used this page to generate the factor.
The resulting code doesn't use / or % operators. Only >>, *, +, - are used.
References

http://ridiculousfish.com/blog/posts/labor-of-division-episode-i.html
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.33.1710
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.1.2556

C
#include <stdio.h>
#include <stdlib.h>

unsigned  next_p( unsigned p )
{
  unsigned  next =
    ( 8 & ((p << 1) & ((~p) << 2)) )     |
    ( 4 & (~p) )                         |
    ( 2 & ((p >> 2) | ((p >> 1) & p)) );

  return next;
}

unsigned  mAp( unsigned x, unsigned p )
{
  unsigned  the_rest = 0;

  if (x > 1)
    the_rest = mAp( x >> 1, next_p(p) );

  if (x & 1)
    return (the_rest < 10 - p) ? the_rest + p : the_rest + p - 10;
  else if (x)
    return  the_rest;
  else
    return 0;
}

unsigned  fumA( unsigned x )
{
  unsigned  v = mAp( x >> 1, 2 );

  if (x & 1)
    ++v;

  if (v < 10)
    return v;

  return fumA( v-10 );
}

unsigned  rflipper(unsigned x, unsigned *p)
{
  unsigned  y = 0;

  if (x >= 10)
    y = rflipper( x / 10, p );

  y += fumA(x) * *p;

  (*p) *= 10;

  return y;
}

unsigned  rflip(unsigned x)
{
  unsigned  p = 1;

  return rflipper(x, &p);
}

int main(int argc, char*argv[])
{
  unsigned  i;

  if (argc < 2)
    {
      printf( "Useage:\n\t%s <positive integer>\n\n", argv[0] );
      return 0;
    }

  i = rflip(atoi(argv[1]));

  printf( "%d\n", i );

  return i;
}

Extended BrainFuck
;;; variables
:input
:flag
:zero

;;; macros
;; read byte with all EOF conventions
;; + it also stops on linefeed
;; compatible BF interpreters translate CRLF => LF
;; so this would be portable
;; char value is one more than actual value
{read_byte
   $flag +
   $input ,
   +[-[10-[11+$flag-]]]
   >[@flag-$zero]
}

;; assumes current cell is empty
;; prints out a linefeed
{linefeed
   10+.
}

;; Assumes data starts to the left of current cell
;; prints until zero
{print_bytes_left
 <[.<]
}

;;; main program
while more $input +
( -
  >@input    ;; shift variables to the right
  &read_byte ;; read in byte
)
&print_bytes_left
&linefeed

Since someone beat me to a BF answer I rewrote it in EBF and made it portable and compatible. This doesn't wrap cells, it stops when encontering any one of the 3 EOF indicators or a linefeed. In compatible interpreters CRLF is translated to just a LF so this should work on any interpreter.
Usage:
% bf ebf.bf < rev.ebf > rev.bf
% echo 2345 | bf -w rev.bf
5432

The resulting BrainFuck code (output of jitbf rev.bf --bf) is:
-[+>>+<,+[-[----------[+++++++++>-]]]>[->]<<]<[.<]++++++++++.

Same as with the previous answer and the other BF entry this just stores the input and print it in reverse order.
I don't consider this an array since I made no way of random access (yes, I use arrays in (E)BF)  so this is more a stack structure.
Strings do not exist in BF but we do store them in similar manner as in this code.

Except for the first >, this was already posted.

@hvd I didn't see that. Commented about missing > to the other poster and redid my answer to be different (more compatible).

C++
 int main()
    {
    int num =123456;
    int rev =0;
    while(num)
    {
    rev = (rev *10) + (num%10);
    num = num /10;
    }
    cout << "Reverse :" << rev;
    return 0;
    }

This program accepts anything from input and outputs it reversed. So it can reverse strings, integers, floating point numbers, leading zero numbers, and other stuff. Please note that I'm not using strings but chars, so it should be ok.
 PHP, HTML
<?php
    while (false !== ($char = fgetc(STDIN))) {
    ?> <div style="float:right;"> <?= $char ?> </div> <?php
    }
?>

I don't know if float:right would be considered a string or not, and just in case, here's a longer solution without that.
 PHP, HTML, CSS
<style>
div {
    float:right;
}
</style>

<?php
    while (false !== ($char = fgetc(STDIN))) {
        ?> <div> <?= $char ?> </div> <?php
    }
?>

PHP
No (built in) modulo, no string, no array;
function reverse ($n) {
    $r = 0;
    while ($n) {
        $r *= 10;
        $head = (int) ($n / 10);
        $r += $n - 10 * $head;
        $n = $head;
    }

    return $r;
}

function recurse(accumulator) {
    var power = accumulator.power;
    accumulator.power *= 10;
    if (accumulator.input >= accumulator.power)
         recurse(accumulator);
    while (accumulator.input >= power) {
        accumulator.input -= power;
        accumulator.result += accumulator.value;
    }
    accumulator.value *= 10;
 }

 function reverse(x) {
    var accumulator = { power: 1, value: 1, input: x, result: 0 };
    recurse(accumulator);
    return accumulator.result;
 }

Java
This code has the following limitations:

it probably only works on the Eclipse console.
it's limited to natural integers.
it's artificially limited to a total of 100 figures (accross multiple calculations in sequence), this limit may be increased at the cost of performance, but the bottlenecks are probably the number of cores and the user's patience.
it's not thread-safe. Use at your own risk.

It essentially spawns a new Thread for each input byte and sleeps a bit less each time before writing it on the standard output.
public static void main(String[] args) {
    System.out.println("Enter the number you want to reverse.");
    int i = -1;
    int count = 0;
    while (true) {
        try {
            i = System.in.read();
            final int readEntry = i;
            if(readEntry!=13&&readEntry!=10){
                final int wait = count++;
                new Thread(new Runnable(){
                    @Override
                    public void run() {
                        try {
                            Thread.sleep(100-wait);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                        System.out.print(readEntry-48);
                    }
                }).start();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Golfscript
-1/

Pass an unsigned int as a command line arg

C#
Using totally unnecessary recursion:
int Reverse(int i)
{
    return ReverseRecurse(i, 0);
}

int ReverseRecurse(int i, int r)
{
    if (i==0) return r;
    else
    {
        int d= i/10;
        return ReverseRecurse(d, (10*r)+(i-(d*10)));
    }
}

Python
Probably not the best implementation, and I regret the need to import the math module, but here it is!
import math

def Reverse(n):
    revNum = 0
    digitsNum = math.floor(math.log10(n))

    for i in range(digitsNum, -1, -1):
        section = n // (10**(digitsNum-i))
        revNum += (section - 10*(section//10)) * 10**i

    return revNum

Java
public class Reverser {

    public static long reverse(long x)
    {
        long n = (long) Math.floor(Math.log(x)/Math.log(10));
        long c = 0;
        for (long k=1; k<=n; k++)
        {
            c+= (long) (Math.floor( x * Math.pow(10, -1.0*k)) * Math.pow(10, n-k));
        }

        return (long) (x*Math.pow(10, n)) - (99 * c);

    }

    public static void main (String args[])
    {
        long a= 1230504;
        long b= reverse(a);
        System.out.println(String.format("a=%d, b=%d", a,b));
    }
}

C#
Magic numbers and shifting bits... no division, no modulo, no chars, no strings, no arrays.  Just integers, adding, bit shifts, and multiplication.
    static void Main(string[] args)
    {
        UInt32 uin = UInt32.Parse(Console.ReadLine());
        UInt32 usave = uin;
        UInt64 rl;
        UInt32 q;
        UInt32 uout = 0;
        int digits = 0;
        while (uin > 0){
            rl = (UInt64)3435973837*uin;
            uin = (UInt32)(rl >> 35);
            digits++;
        }
        uin = usave;
        while (uin > 0)
        {
            rl = (UInt64)3435973837 * uin;
            q = (UInt32)(rl >> 35);
            uout += (uin - q * 10)*(UInt32)Math.Pow(10,(digits-1));
            uin = q;
            digits--;
        }
        Console.WriteLine(uout);
    }

This answer actually has some utility because, although it is highly obfuscated, it provides a really fast way to simultaneously implement div 10 and modulo 10 in 64-bit code.  See : How do I implement an efficient 32 bit DivMod in 64 bit code

Javascript
function reverse(num) {
    for(var r = 0; num!=+[]; num = parseInt(num / 10, 10)) {
        r *= 10;
        r += num % 10;
    }
    return r;
}

I would appreciate if the one who voted -1 gave a reason for the same. :)

C++11
This code builds a function that prints an integer from STDIN in reverse, and then executes that function. Basically it is an example of really bad functional programming with loads of side effects.
#include <cstdio>
#include <functional>

void r(std::function<void()> f) {
    char c = getchar();
    c > 47 && c < 58
    ?   r([=]() {
            putchar(c);
            f();
        })
    :   f();
}

int main() {
    r([]() {
        putchar(10);
    });
    return 0;
}

Java
int res = 0;
int numb = 25455236;
while(numb > 0){
  int temp = numb;
  int counter = 0;
  while (temp >= 0){
    temp = temp - 10;
    counter++;
  }
  res += 10-(counter*10-numb);
  res *= 10;
  numb = counter-1;
}
System.out.println(res/10);

C
No mod.
#include <stdio.h>
int main()
{
    unsigned long n, m=0;
    scanf("%lx", &n);
    while( n ) m = m<<4 | n&0xF, n >>= 4;
    printf("%lx\n", m);
}

C
Here is an actual procedure that takes an unsigned as input and returns the reversed value.
unsigned long reverse(unsigned long n){
    unsigned long p=1, m=0, q=1;
    while( p<=n ) p *= 10;
    while( p /= 10 ){
        while( p<=n ) n -=p, m+= q;
        q *= 10;
    }
    return m;
}

Dart
r(n, [a=0]) => n>0 ? r(n ~/ 10, a * 10 + n % 10) : a;

Use as:
main() { print(r(13457)); }  // prints 75431

Only works for non-negative integers.


text:
Validate input according to flags and input masks
This challenge challenges you to write a function that will take as its argument an array that specifies the types of input, an optional prompt, and a verification key; inputs and validates the values; and returns them.
Input types:

b - Boolean values.
  c - Characters.
  i - Integer values, rejects floating point values.
  f - Floating point values, accepts integers.
  n - Strings that only contain the characters a-z and A-Z, suitable for names.
  s - Strings with any character type.
  d - Dates in the form of dd/mm/yyyy, leap years and dates previous to 01/01/1900 can be rejected.

Examples:

b - Takes input as specified values, validates it, and returns "0" (false) or "1" (true).
  c - Accepts any character.
  i - Accepts any integer or number that, when the decimal is dropped, the resulting number is identical to the original number, such as 3 or 90.0.  Rejects all other floating point values, such as 4.2 and 5.009.
  f - Accepts any floating point or integer values. Floating point values include any number with a decimal value between .1 and .9. Numbers with .0 can count as a integer.
  n - Accepts any string that contains only the characters a-z and A-Z. This input will accept "Name," but reject "Name1" and "My name."
  s - Accepts any type of string.
  d - Accepts any valid date of the form dd/mm/yyyy, such as 03/01/2014.

The function will take an array, vector, or other variable length type as an argument.  Each element of the array will contain sub-elements of the input type request input type, an optional prompt, and for the input types s, i, and f, an optional validation format. Input type b must include a validation format in the form of "True/False". The array must be formatted as {type, prompt, validation}.
If no prompt is given, the function will use "> " as a prompt.
If a validation format for input type s is given, it can contain any character that must be matched exactly and a request for any number of characters matching certain criterion.  To request the string to have a specific number alphabetic characters (a-z and A-Z), use the format %(number of characters)(c), as in %6c, which requests 6 characters. To request that the input be a certain number of single-digit integers, use %(number of digits)(i), as in %6i, which requests six digits. Any other character given must be matched directly, where i equals i and - equals -". Use %% to signify % because % alone is used to represent a command, as above. These rules can be combined, where i%6c-%%%2ixx represents an input matching i + 6 characters + -% + 2 digits + xx, where ifizlwi-%62xx is a valid example.
Input validation formats for types i and f must be the in the form lowest/highest, where lowest is the lowest acceptable number and highest is the highest acceptable number.  Example: 6/50 would require a number between 6 and 50 (inclusive) to be input.
The function will return an array of strings that can be parsed by your program.
Return formatting:

b - Returns "0" (false) or "1" (true).
  c, i, f, n, s, l, and d - returns input formatted as string.

Example call:
String s[][] = {{"n", "First name: "}
           {"n", "Last name: "}
           {"i", "Age: "}
           {"d", "Date (dd/mm/yyyy): "}
           {"s", "ISBN: ", "%1i-%6i-%2i-%1i"}
           {"b", "Check out: ", "Yes/No"}};

String[] response = input(s);

The Boolean input will give the options as part of the prompt by displaying the input request as "(True/False)" after the prompt. The above example will display as

"Check out: (Yes/No)"

The function must continue requesting input until a valid input for each request is given.
No internet resources are allowed.
Any input-functions in any language that input and validate any type must not be used.  E.g. if a language contains a function to input and validate an integer besides the traditional input function (System.in, cin>>, input(), etc.), that function must not be used.  You must do the validation yourself.
No trolling-style answers allowed. There are plenty of trolling questions for you to have fun with.
Shortest code code-golf that correctly inputs each of the specified types wins.

Why the change from the sandbox title? This one is a lot less accurate in describing what you want the program to do.

@JonathanVanMatre Because the other was only 14 characters.

What do you define as a boolean value? Is 0, false, 'false', '', 'off', '0' all boolean values which evaluate as false?

@IsmaelMiguel Just return the string "0" for false because all the values have to be returned in a string array.  Otherwise, how could you return all the values?  Use "1" for true.

@hosch250 Which input is a valid boolean input?

@IsmaelMiguel Anything you say.  The Boolean value must include a validation key in the format "True/False".  It will give the options when requesting input, then return "0" or "1" to the caller.

I think I got it. In your example, you have {"b", "Check out: ", "Yes/No"}. Why not {"b", "Check out: ", "Yes", "No"}? It is easier to check the values and no parsing is required.

@IsmaelMiguel Because that would split the validation string into two pieces.  I guess it could be done that way, but it will be easier to call it this way.  Once it is done, this code is pretty much out of sight (assuming it was being actively used).

C++, 4011 characters
This is the function:
#include<iostream>
#include<string>
#include<vector>
using namespace std;
vector<string>i(int a,const string s[][3]){vector<string>q;for(int i=0;i<a;i++){string t,r,f;cout<<(s[i][1]!=""?s[i][1]:"> ");if(s[i][0]=="b"){bool b=1;for(int j=0;j<s[i][2].size();j++){if(b&s[i][2][j]==47){b=0;continue;}b?r+=s[i][2][j]:f+=s[i][2][j];if(b&j==s[i][2].size()-1|!b&s[i][2][j]==47){b=1;q.push_back("0");}}if(s[i][2].size()==0||s[i][2][s[i][2].size()-1]==47||s[i][2][0]==47){b=1;q.push_back("0");}if(b)cin.putback('\n');while(!b){cout<<"("<<s[i][2]<<") ";cin>>t;if(t==r|t==f){q.push_back(t==r?"1":"0");break;}cout<<"Please enter "<<r<<" or "<<f<<".\n"<<(s[i][1]==""?"> ":s[i][1]);}}if(s[i][0]=="c"){while(t.size()!=1){cin>>t;if(t.size()>1)cout<<"Please enter a character.\n"<<(s[i][1]==""?"> ":s[i][1]);}q.push_back(t);}if(s[i][0]=="i"){double d;int j,l=0,b=0;bool x=1;if(s[i][2].size()>2){for(int j=0;j<s[i][2].size();j++){int k=s[i][2][j];if((k<47|k>57)&k!=45){b=0;break;}if(k==45){if(j==0||s[i][2][j-1]==47)l++;else{b=0;break;}}if(k==47){if(j==0||s[i][2][j-1]==45||j==s[i][2].size()-1){b=0;break;}else{b++;x=0;continue;}}x?r+=s[i][2][j]:f+=s[i][2][j];}}if(b==1){x=1;l=stoi(r);b=stoi(f);}else x=0;l>b?x=0:"";while(1){cin>>r;for(int k=0;k<r.size();k++){if(!isdigit(r[k])&r[k]!=45){d=.5;break;}else d=stod(r);}j=d;if(!cin|j!=d|(x&&(j<l|j>b))){cin.clear();getline(cin,t);cout<<"Please enter an integer";if(!x)cout<<".\n";else cout<<" in the range of "<<l<<" and "<<b<<endl<<(s[i][1]==""?"> ":s[i][1]);}else break;}q.push_back(to_string(j));}if(s[i][0]=="f"){double d,l=0,b=0;bool x=1;if(s[i][2].size()>2){for(int j=0;j<s[i][2].size();j++){int k=s[i][2][j];if(k<45|k>57){b=0;break;}if(k==45){if(j==0||s[i][2][j-1]==47)l++;else{b=0;break;}}if(k==47){if(j==0|s[i][2][j-1]==45|j==s[i][2].size()-1){b=0;break;}else{b++;x=0;continue;}}if(x)r+=s[i][2][j];else f+=s[i][2][j];}}if(b==1){x=1;l=stod(r);b=stod(f);}else x=0;l>b?x=0:"";while(1){cin>>r;for(int k=0;k<r.size();k++){if(r[k]<45|r[k]>57|r[k]==47){cin.putback('k');cin>>d;break;}else d=stod(r);}if(!cin||(x&&(d<l|d>b))){cin.clear();getline(cin,t);cout<<"Please enter a floating point number";if(!x)cout<<".\n";else cout<<" in the range of "<<l<<" and "<<b<<endl<<(s[i][1]==""?"> ":s[i][1]);}else break;}q.push_back(to_string(d));}if(s[i][0]=="n"){bool b=1;while(b){cin>>t;for(int j=0;j<t.size();j++){if(!isalpha(t[j])){cout<<"Please enter a string with only letters.\n"<<(s[i][1]==""?"> ":s[i][1]);break;}if(j==t.size()-1)b=0;}}q.push_back(t);}if(s[i][0]=="s"){for(int j=0;j<s[i][2].size();j++){if(s[i][2][j]==37){if(s[i][2][j+1]>47&s[i][2][j+1]<58){int n=s[i][2][j+1]-48;if(s[i][2][j+2]!=99&s[i][2][j+2]!=105){r="";break;}for(int k=0;k<n;k++){r+='%';r+=s[i][2][j+2];}j+=2;}else if(s[i][2][j+1]==37){r+="%%";j+=1;}else{r="";break;}}else r+=s[i][2][j];}while(1){getline(cin,t);if(r.size()!=0){int j=0,k=0;for(;j<r.size();j++){if(r[j]==37){j++;if(r[j]==105){if(t[k]<48|t[k]>57){j=-1;break;}else{k++;continue;}}if(r[j]==99){if(!(t[k]>64&t[k]<91|t[k]>96&t[k]<123)){j=-1;break;}else{k++;continue;}}}if(r[j]==t[k])k++;else{j=-1;break;}if(j==r.size()-1^k==t.size()){j=-1;break;}}if(j!=-1)break;cout<<"Please enter a string in the format "<<r<<"\nThe % signs indicating special characters.\nIf the symbol after the % sign is %, enter %;\nif it is i, enter any digit between 0 and 9 (inclusive);\notherwise, enter any alphabetical charater a-z or A-Z.\n"<<(s[i][1]==""?"> ":s[i][1]);}else break;}q.push_back(t);}if(s[i][0]=="d"){bool x=1;while(1){string d,m,y;int a,b,c;cin>>t;if(t.size()==10&&t[2]==47&t[5]==47){for(int j=0;j<10;j++)if(t[j]<47|t[j]>57){x=0;break;}if(x){d+=t[0];d+=t[1];a=stoi(d);m+=t[3];m+=t[4];b=stoi(m);y+=t[6];y+=t[7];y+=t[8];y+=t[9];c=stoi(y);if(c>1900&a>0){if((b==1|b==3|b==5|b==7|b==8|b==10|b==12)&a<32)break;if((b==4|b==6|b==9|b==11)&a<31)break;if(b==2&((c%4==0&c%100!=0&a<30)|(c%400==0&a<30)|a<29))break;}}}cout<<"Please enter a date after 01/01/1900 in the form dd/mm/yyyy.\n"<<(s[i][1]==""?"> ":s[i][1]);}q.push_back(t);}if(s[i][0]!="s")getline(cin,t);}return q;}

Run it with this as main():
int main() try{

    const int args = 10;
    string s[args][3];

    s[0][0]="b",s[0][1]="",s[0][2]="yes/no";
    s[1][0]="c",s[1][1]="Enter a character: ";
    s[2][0]="i";
    s[3][0]="i",s[3][1]="",s[3][2]="4/6";
    s[4][0]="f";
    s[5][0]="f",s[5][1]="",s[5][2]="-2.4/6.3";
    s[6][0]="n",s[6][1]="";
    s[7][0]="s",s[7][1]="",s[7][2]="rt%%%1c%2id";
    s[8][0]="s",s[8][1]="";
    s[9][0]="d",s[9][1]="Enter a date: ";

    vector<string>v=i(args,s);

    for(int i=0;i<args;i++)cout<<v[i]<<endl;
}
catch(exception&e){cerr<<"Error: "<<e.what()<<endl;}
catch(...){cerr<<"Unknown error.\n";}

About 1000 of these characters are a little redundant.  I made it validate in leap years, and I checked the custom validation values for the correct format to ensure there wouldn't be errors.  If there were errors, b returns false as default and the rest ignore the custom validation.