def getInt(s, notFoundReturn=-1):
    """ attempt to find a positive integer in a string
    @param s [string]
    @param notFoundReturn = value to be returned if no integer is found
    @return int
    """
    firstIx = -1
    for i, c in enumerate(s):
        if c in "0123456789":
            firstIx = i
            break

    if firstIx == -1:
        return notFoundReturn

    to = firstIx+1
    while 1:
        #print "s=%r firstIx=%r to=%r" % (s, firstIx, to)

        # if (nextIx) at end of string, break
        if to+1 > len(s): break
        ch = s[to]
        #print "to=%r ch=%r" % (to, ch)
        if ch not in "0123456789": break
        to += 1
    #print "firstIx=%r to=%r" % (firstIx, to)
    numStr = s[firstIx:to]
    return int(numStr)