Regular expression with an = and a ;

前端 未结 5 948
情深已故
情深已故 2021-02-12 15:02

I\'m trying to use a regular expression to find all substrings that start with an equals sign (=) and ends with a semicolon (;) with any number of char

5条回答
  •  抹茶落季
    2021-02-12 15:34

    The regex you provided would match ;, ===;, ..., ================;. How about =.*; (or =.*?; if non-greedy is needed)?

提交回复
热议问题