推荐学习书目
› 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 · 3073 views
    This topic created in 3764 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
    Cynic222
    Jul 18, 2016 via Android
    1
    这是 raw 字符串,?是给)的
    billlee
    billlee
    Jul 18, 2016
    2
    这是 options, s - single line, i - case insensitive
    RTFM
    fzinfz
    fzinfz
    Jul 18, 2016
    3
    dacapoday
    dacapoday
    Jul 19, 2016
    4
    oglop
    oglop
    Jul 19, 2016 via Android
    5
    @dacapoday ls 这是哪个网站解析的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   824 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 171ms · UTC 18:25 · PVG 02:25 · LAX 10:25 · JFK 13:25
    ♥ Do have faith in what you're doing.