Last active
          December 10, 2015 20:58 
        
      - 
      
 - 
        
Save wolmhp/4491691 to your computer and use it in GitHub Desktop.  
    Python 正则的写法
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | pattern = re.compile(r'''Hello''', re.M) | |
| match = pattern.match('Hello World!') | |
| if match: | |
| return match.group(1) | |
| return None | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment