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
Post a Comment