Version: 20220729
class="
and "
Find: (?s)class="*\K.*?(?=")
Replace:
Results: class=""
Find: ([a-zA-Z\d\- ]+)=""
Search: [attribute]="([a-zA-Z\d ]+)"
or [attribute]="(.+)"
Replace: [attribute]="\L$1"
[attribute]="([a-zA-Z\d\&\- ]+)"
[attribute]="([a-zA-Z\d ]+)\|mobile"
([\w\d\s]+)
<svg
and </svg>
Find: (?s)<svg*\K.*?(?=</svg>)
Replace: >
Results: <svg></svg>
/Users/<user>/Library/Application Support/Sublime Text/Packages/User/reg_replace_rules.sublime-settings
{
"replacements": {
"rule1": {
"find":"",
"replace":"",
"greedy": true
},
"rule2": {
"find":"",
"replace":"",
"greedy": true
}
}
}
where
"[\\n\\s]*" = any newline or space
"(string1|string2)" = looking for "string1" or "string2"
"[\\n\\s]*\"(property1|property2)\":[\\n\\s]*{[\\n\\w\"\\:\\,. ]*}," = replace entire json of "property1 = { stuff: stuff, },"
/Users/<user>/Library/Application Support/Sublime Text/Packages/User/Default (OSX).sublime-keymap
[
{
"keys": ["option+ctrl+r"],
"command": "reg_replace",
"args": {"replacements": ["rule1","rule2"]}
}
]