用正则表达式提取css的一条规则该怎么写?如 div { left : 10px; } 我想提取里头 left : 10px;这个字符串

2025-05-23 14:50:54
推荐回答(1个)
回答1:

div\s+{([^}]+)}

需要的字串放在第一个捕获括号里面。