推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
xinali
V2EX  ›  Python

python 正则表达式相关

  •  
  •   xinali · Jul 18, 2016 · 2904 views
    This topic created in 3720 days ago, the information mentioned may be changed or developed.

    在阅读 sqlmap 源码时,有个爬虫的代码的一段正则表达式

    tags = re.finditer(r'(?si)<a[^>]+href="(?P<href>[^>"]+)"', content) 
    

    这个正则表达式的(?si)表示的是什么意思?

    6 replies  •  2016-07-19 10:41:48 +08:00
    Cynic222
        1
    Cynic222  
       Jul 18, 2016 via Android
    这是 raw 字符串,?是给)的
    billlee
        2
    billlee  
       Jul 18, 2016
    这是 options, s - single line, i - case insensitive
    RTFM
    fzinfz
        3
    fzinfz  
       Jul 18, 2016
    dacapoday
        4
    dacapoday  
       Jul 19, 2016
    oglop
        5
    oglop  
       Jul 19, 2016 via Android
    @dacapoday ls 这是哪个网站解析的
    dacapoday
        6
    dacapoday  
       Jul 19, 2016
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1020 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 23:15 · PVG 07:15 · LAX 16:15 · JFK 19:15
    ♥ Do have faith in what you're doing.