kqij

你是如何掌握正则表达式的?有哪些经验可以分享?

  •  
  •   kqij · Apr 27, 2015 · 3597 views
    This topic created in 4063 days ago, the information mentioned may be changed or developed.
    22 replies    2015-04-28 02:29:36 +08:00
    FrankFang128
        2
    FrankFang128  
       Apr 27, 2015
    正则表达式30分钟入门教程 http://deerchao.net/tutorials/regex/regex.htm
    结贴。
    FrankFang128
        3
    FrankFang128  
       Apr 27, 2015
    原来和一楼是同一个。
    kqij
        4
    kqij  
    OP
       Apr 27, 2015
    楼上这个正则教程很热门,看过的人应该不少
    lululau
        5
    lululau  
       Apr 27, 2015
    两条命令足够:

    ```
    perldoc perlre
    echo hello world | grep -P --color re-pattern
    ```
    HeyMan
        6
    HeyMan  
       Apr 27, 2015
    一楼的教程很好,不过看完一边用完后就忘了,下次用还得再拿出来参考。
    jiyee
        7
    jiyee  
       Apr 27, 2015
    你自学之后试着去做一次小的分享,你就会了。
    lsmgeb89
        8
    lsmgeb89  
       Apr 27, 2015
    就这个教程 http://deerchao.net/tutorials/regex/regex.htm 每次用的时候查,看了大概 3,4 遍,就可以不看手写了,就是用用熟就好了。
    good
        9
    good  
       Apr 27, 2015
    正则可视化调试工具 https://www.debuggex.com/
    rcmerci
        10
    rcmerci  
       Apr 27, 2015
    先学了python的re,然后看了编译原理
    tmqhliu
        11
    tmqhliu  
       Apr 27, 2015
    发两个网站,一个是教程:
    http://www.regexlab.com/zh/regref.htm
    一个是测试站:
    https://regex101.com/
    pepsin
        12
    pepsin  
       Apr 27, 2015
    http://rubular.com + 被逼着需要写一大堆的语法解析(当时还是小白,还不知道什么 NFA 啥的鬼,只能正则闷声搞)
    ynyounuo
        13
    ynyounuo  
       Apr 27, 2015
    http://www.regexr.com/
    最好用的平台应该是这个。
    kechx
        14
    kechx  
       Apr 27, 2015
    https://regex101.com/
    其实这个也不错
    esile
        15
    esile  
       Apr 27, 2015 via iPhone
    不要被正则吓到,其实常用的就是那几个,别的需要的时候再找吧
    7anshuai
        16
    7anshuai  
       Apr 27, 2015
    贴一个我翻译的交互式 try regex - http://js101.co/tryregex/
    codeface
        17
    codeface  
       Apr 27, 2015
    一开始写爬虫的时候还不知道BeautifulSoup,所以被逼着都用正则了。
    leavic
        18
    leavic  
       Apr 27, 2015
    多用,这才是关键。
    skyshy
        19
    skyshy  
       Apr 27, 2015
    可视化正则~ http://regexper.com/
    joyee
        20
    joyee  
       Apr 28, 2015
    经常用sublime text的替换+正则做各种杂事,用多了就熟了……(然后安利给其他不是程序员的亲友
    shuding
        21
    shuding  
       Apr 28, 2015
    把这个刷了一通,然后看了看别人的解答: https://regex.alf.nu/ ……
    xiazhichenjlu
        22
    xiazhichenjlu  
       Apr 28, 2015
    Learn regular expression in about 55 minutes
    Hacker News: https://news.ycombinator.com/item?id=7370622
    讨论里有相关的讨论和其它关于 Regex 的链接。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5550 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 235ms · UTC 07:03 · PVG 15:03 · LAX 00:03 · JFK 03:03
    ♥ Do have faith in what you're doing.