regex - Python Regular Expressions Re.Search -


i having issues figuring out regular expression means:

import re if re.search('^(0*)$','010'):     print 'match' else:     print 'no match' 

i'm confused 0* in brackets, 0* mean? can please help? i'm starting learn more regular expressions, , know other symbols in code mean. output : "no match".

hope can help.

thanks everyone!

0* matches on 0 or more 0. ^ , $ says wohle string should match , not partial.

simple regex basics examples: http://www.rexegg.com/regex-quickstart.html

sorry pasting link, pain write them down :-)


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -