V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
LeeReamond
V2EX  ›  问与答

两个(或多个)正则表达式匹配其中任意一个应该怎么写?

  •  
  •   LeeReamond · Nov 7, 2021 · 927 views
    This topic created in 1633 days ago, the information mentioned may be changed or developed.

    如题,有几个各自独立的中等复杂程度的正则表达式。

    有办法写在一个式子里,匹配几种情况里的任意一种情况吗?

    谢谢大家。如果有举例的话最好是 python regex 语法的

    xupefei
        1
    xupefei  
       Nov 7, 2021 via iPhone
    (A|B)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5984 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 03:33 · PVG 11:33 · LAX 20:33 · JFK 23:33
    ♥ Do have faith in what you're doing.