If "ab" match ".*c"?


  • 0

    I want to know why "ab" and ".*c" not match,the problem and the sample all without description,thanks for someone to solve my question.


  • 0
    Z
    This post is deleted!

  • 0
    E

    因为.*c要匹配 任意字符串c 啊
    有一个特别恶心的答案是 new RegExp('^'+p+'$') 直接匹配然后就过了
    所以可以看出 你从头到尾是都要完全匹配上的 所以那个多余的c肯定不会是完全没用的

    发中文你肯定看得懂...
    我就不用英文了


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.