【问题标题】:Add prefix to all class names in visual studio code为 visual studio 代码中的所有类名添加前缀
【发布时间】:2023-01-27 02:02:12
【问题描述】:

我的目标是在我的代码中为每个类名附加前缀。所以我想让class="text-black border-b p-2 border-gray-100 flex justify-between"变成class="tw-text-black tw-border-b tw-p-2 tw-border-gray-100 tw-flex tw-justify-between"

【问题讨论】:

    标签: visual-studio-code


    【解决方案1】:

    试试这个查找和替换:

    查找:(?<=class="[^"]*)([^s"]+)
    替换:tw-$1

    regex101 demo

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-09
      • 1970-01-01
      • 2022-10-18
      • 1970-01-01
      • 2014-07-26
      • 2013-02-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多