Wijaya Edward wrote:
> Hi,
>
> Given this list:
>
> list = ['0123', '1A34' , '333-' , '' ]
>
> I want to match only this element
> '0123' (pure numeric) and '' (empty element).
>
> Why this construct doesn't work?
>
> p = re.compile("''+|[0-9]+")
>m = p.match(word)
>
Hi,
Given this list:
list = ['0123', '1A34' , '333-' , '' ]
I want to match only this element
'0123' (pure numeric) and '' (empty element).
Why this construct doesn't work?
p = re.compile("''+|[0-9]+")
m = p.match(word)
if m:
print word,
Nam