I\'m trying to write a function in python, which will determine what type of value is in string; for example
if in string is 1 or 0 or True or False the value is BI
In reply to
For example it doesn't work for 2010-00-10 which should be Text, but is INT or 20.90, which should be float but is int
>>> import re
>>> patternINT=re.compile('[0-9]+')
>>> print patternINT.match('2010-00-10')
<_sre.SRE_Match object at 0x7fa17bc69850>
>>> patternINT=re.compile('[0-9]+$')
>>> print patternINT.match('2010-00-10')
None
>>> print patternINT.match('2010')
<_sre.SRE_Match object at 0x7fa17bc69850>
Don't forget $
to limit ending of string.