import re as RegEx


def Commatize( _string, _startPos=0, _periodLen=3, _separator= ):
	outString = 
	strPos = 0
	matches = RegEx.findall( , _string )

	for match in matches[:-1]:
		if not match:
			outString += _string[ strPos ]
			strPos += 1
		else:
			if len(match) > _periodLen:
				leadIn = match[:_startPos]
				periods =  [ match [ i:i + _periodLen ] for i in range ( _startPos, len ( match ), _periodLen ) ]
				outString += leadIn + _separator.join( periods )
			else:
				outString += match

			strPos += len( match )

	return outString



print ( Commatize( , 0, 5,  ) )
print ( Commatize( , 0, 3,  ))
print ( Commatize( -in Aus$+1411.8millions\ ))
print ( Commatize(  ))
print ( Commatize(  ))
print ( Commatize(  ))
print ( Commatize(  ))
print ( Commatize(  ))
print ( Commatize(  ))
print ( Commatize(  ))
print ( Commatize(  ))