Using regular expression in css?

前端 未结 8 1690
野的像风
野的像风 2020-11-22 06:01

I have an html page with divs that have id(s) of the form s1, s2 and so on.

8条回答
  •  长发绾君心
    2020-11-22 06:22

    Try my generic CSS regular expression

    (([a-z]{5,6}.*?\))|([\d.+-]?)(?![a-z\s#.()%])(\d?\.?\d?)?[a-z\d%]+)|(url\([/"'][a-z:/.]*['")]\))|(rgb|hsl)a?\(\d+%?,?\s?\d+%?,?\s?\d+%?(,\s?\d+\.?\d?)?\)|(#(\w|[\d]){3,8})|([\w]{3,8}(?=.*-))
    

    Demo https://regexr.com/4a22i

提交回复
热议问题