re.match:

  match from the beginning of the string

re.search:

  scan through the whole string to find a match

dash '-' inside square '[]' means a range. put dash in the end to just match a dash

  

posted on 2016-07-02 21:48  学思罔殆  阅读(208)  评论(0编辑  收藏  举报