LeeReamond
V2EX  ›  问与答

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

  •  
  •   LeeReamond · Nov 7, 2021 · 1099 views
    This topic created in 1734 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   ·   3813 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 00:46 · PVG 08:46 · LAX 17:46 · JFK 20:46
    ♥ Do have faith in what you're doing.