Chhxin
V2EX  ›  问与答

大佬们, js 正则表达式求助,秃然啊!

  •  
  •   Chhxin · Jan 16, 2020 · 1913 views
    This topic created in 2324 days ago, the information mentioned may be changed or developed.

    长度 2-64 个字符,允许使用(.)分割字符成多段,每段允许大小写字母、数字或连字符(-),但不能连续使用(.)和(-)。不能以(-)和(.)开头结尾。

    本渣渣给大佬们跪了!!!

    2 replies    2020-01-19 09:49:29 +08:00
    Zoro76
        1
    Zoro76  
       Jan 16, 2020
    /^[^.-]((?![.-]{2,})[\w.-]){2,60}[^.-]$/
    Chhxin
        2
    Chhxin  
    OP
       Jan 19, 2020
    @Zoro76 非常感谢,给大佬跪了!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3000 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 14:34 · PVG 22:34 · LAX 07:34 · JFK 10:34
    ♥ Do have faith in what you're doing.