Answer the question
In order to leave comments, you need to log in
Wgef thr re err sql?
ghmuimgnbfymumrynbunv trbtybtnyunyunyunyyy
Answer the question
In order to leave comments, you need to log in
>>> import re
>>> s='a2323423'
>>> re.search(r'^[^p]\d+',s)
<_sre.SRE_Match object at 0x01E50A30>
*******
>> > s='p1234567890'
>>> re.search(r'^p(\d+){10,10}$',s)
<_sre.SRE_Match object at 0x01D69360>
and why are regular expressions here, if you can do with the usual if?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question