LeeReamond
V2EX  ›  问与答

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

  •  
  •   LeeReamond · Nov 7, 2021 · 1082 views
    This topic created in 1718 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   ·   5400 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 07:38 · PVG 15:38 · LAX 00:38 · JFK 03:38
    ♥ Do have faith in what you're doing.